wallet

package module
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 18 Imported by: 0

README

Halogen Wallet

Package wallet is a Go client for calling the Halogen Wallet HTTP API.

Installation

You may install the package using go get.

$ go get github.com/halogencapital/wallet-go
Documentation:

Checkout https://pkg.go.dev/github.com/halogencapital/wallet-go

Quick start
  1. Login to https://wallet.halogen.my.

  2. Navigate to Settings > API Keys.

  3. Create a new API key by providing a Certificate Signing Request (CSR). Elliptic Curve P-256 (recommended) and RSA-4096 are supported.

    • Generate new EC P-256 CSR using OpenSSL.
      mkdir -p .key
      openssl ecparam -name prime256v1 -genkey -noout -out .key/ec_private_key.pem
      openssl req -new -key .key/ec_private_key.pem -out .key/ec_csr.pem -sha256 -subj "/C=US/ST=State/L=City/O=Organization/OU=Unit/CN=example.com"
      
    • Or generate new RSA-4096 CSR using OpenSSL.
      mkdir -p .key
      openssl req -new -newkey rsa:4096 -nodes -keyout .key/rsa_private_key.pem -out .key/rsa_csr.pem -subj "/C=US/ST=State/L=City/O=Organization/OU=Unit/CN=example.com"
      
    • Keep the generated Private Key in a secure storage and never share it with any party. This package will use the Private Key to sign the requests before it is sent to Halogen Wallet server.
  4. Save the Key ID and use it in the client as following:

    client := wallet.New()
    client.SetCredentials(os.Getenv("HALOGEN_WALLET_KEY_ID"), []byte(os.Getenv("HALOGEN_WALLET_PRIVATE_KEY_PEM")))
    output, err := client.ListClientAccounts(context.Background(), &wallet.ListClientAccountsInput{})
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("got %d accounts", len(output.Accounts))
    
Rolling out your own client

Checkout OpenAPI 3.0 specifications.

Documentation

Overview

Authentication

The Halogen Wallet API uses stateless JWT bearer token authentication. The client automatically generates and signs JWT tokens for each request using your credentials, which are added to the Authorization header in the format: "Bearer <JWT>".

Token Generation

The JWT token is constructed with the following Payload fields

  • `kid`: Key identifier (the Key ID returned by Halogen Wallet settings)
  • `sub`: Subject — currently set to the fixed value `"wallet"`
  • `iat`: Issued At (Unix timestamp)
  • `exp`: Expiration (Unix timestamp) — set to `iat + ttl` where `ttl` is the token lifetime the client uses
  • `nonce`: A random hex string used to prevent replay attacks
  • `bodyHash`: Hex-encoded SHA-256 hash of the request body
  • `uri`: The request URI (for example `/query` or `/command`)

The JWT header contains `alg` (set to `ES256` or `RS256` depending on the private key) and `typ: "JWT"`.

The token is then signed using either:

  • ES256 (ECDSA with P-256 curve) when an EC private key is provided
  • RS256 (RSA) when an RSA private key is provided

You do not need to manually generate or sign tokens. The client handles this automatically when you provide credentials via Client.SetCredentials or [Client.Options.CredentialsLoaderFunc].

Rate Limiting

The Halogen Wallet API implements rate limiting to ensure fair usage and system stability. The server allows a maximum of 10 requests per second with a burst capacity of 10 requests. This means you can make up to 10 requests immediately (burst), but sustained traffic is limited to 10 requests per second.

If you exceed the rate limit, the server will respond with an HTTP 429 (Too Many Requests) error. The client automatically retries requests when receiving a 429 response. This ensures that rate limit errors are handled transparently without manual intervention.

Note: The retry configuration in [Client.Options] (MaxReadRetry and RetryInterval) only applies to read operations when the server responds with HTTP status codes >= 500. Rate limit retries (429 errors) are handled separately and automatically.

Example

Here's a complete example showing how to list accounts, available funds, get the projected price, and create an investment:

package main

import (
	"context"
	"log"
	"os"

	"github.com/halogencapital/wallet-go"
)

func main() {
	// Initialize the client
	client := wallet.New()
	client.SetCredentials(
		os.Getenv("HALOGEN_WALLET_KEY_ID"),
		[]byte(os.Getenv("HALOGEN_WALLET_PRIVATE_KEY_PEM")),
	)
	ctx := context.Background()

	// List all client accounts
	accounts, err := client.ListClientAccounts(ctx, &wallet.ListClientAccountsInput{})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Found %d accounts\n", len(accounts.Accounts))

	// Use the first account
	accountID := accounts.Accounts[0].ID

	// List available funds for subscription in this account
	funds, err := client.ListFundsForSubscription(ctx, &wallet.ListFundsForSubscriptionInput{
		AccountID: accountID,
	})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Found %d available funds\n", len(funds.Funds))

	// Use the first fund
	fundID := funds.Funds[0].ID
	fundClassSequence := funds.Funds[0].Classes[0].Sequence

	// Get the projected price for the fund
	price, err := client.GetProjectedFundPrice(ctx, &wallet.GetProjectedFundPriceInput{
		FundID:            fundID,
		FundClassSequence: fundClassSequence,
	})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Fund NAV: %f %s\n", price.NetAssetValuePerUnit, price.Asset)

	// Create an investment request
	investmentAmount := 10000.0
	investReq, err := client.CreateInvestmentRequest(ctx, &wallet.CreateInvestmentRequestInput{
		AccountID:         accountID,
		FundID:            fundID,
		FundClassSequence: fundClassSequence,
		Amount:            investmentAmount,
		ConsentFundIM:     true,
		ConsentHighRisk:   true,
	})
	if err != nil {
		log.Fatal(err)
	}
	log.Printf("Investment request created with ID: %s\n", investReq.RequestID)
}

Query APIs

- Client.ListClientAccounts

- Client.GetClientProfile

- Client.GetFund

- Client.GetClientAccountAllocationPerformance

- Client.GetClientAccountStatement

- Client.GetClientAccountRequestConfirmation

- Client.GetClientReferral

- Client.GetClientAccountRequestPolicy

- Client.ListFundsForSubscription

- Client.ListClientAccountBalance

- Client.ListClientAccountRequests

- Client.ListClientBankAccounts

- Client.ListDisplayCurrencies

- Client.ListClientSuitabilityAssessments

- Client.ListInvestConsents

- Client.ListBanks

- Client.ListClientPromos

- Client.ListClientAccountPerformance

- Client.ListPaymentMethods

- Client.GetVoucher

- Client.GetPreviewInvest

- Client.GetProjectedFundPrice

Command APIs

- Client.CreateInvestmentRequest

- Client.CreateRedemptionRequest

- Client.CreateSwitchRequest

- Client.CreateRequestCancellation

- Client.CreateSuitabilityAssessment

- Client.CreateClientBankAccount

- Client.UpdateDisplayCurrency

- Client.UpdateAccountName

- Client.UpdateClientProfile

Index

Constants

View Source
const (
	// Error codes returned by the Wallet SDK
	//
	// ================================
	// AUTHENTICATION & AUTHORIZATION
	// ================================
	//
	// ErrExpiredApiKey is returned when the API key used in the request has expired.
	ErrExpiredApiKey string = "ErrExpiredApiKey"

	// ErrExpiredAuthToken is returned when the provided authentication token has expired.
	ErrExpiredAuthToken string = "ErrExpiredAuthToken"

	// ErrInsufficientAccess is returned when the client does not have sufficient permissions to perform this action.
	ErrInsufficientAccess string = "ErrInsufficientAccess"

	// ErrInvalidAuthSignature is returned when the request signature is invalid or cannot be verified.
	ErrInvalidAuthSignature string = "ErrInvalidAuthSignature"

	// ErrInvalidAuthToken is returned when the provided authentication token is malformed or invalid.
	ErrInvalidAuthToken string = "ErrInvalidAuthToken"

	// ErrInvalidPublicKey is returned when the supplied public key is invalid or does not match the expected format.
	ErrInvalidPublicKey string = "ErrInvalidPublicKey"

	// ErrUnauthorizedIPAddress is returned when the request originated from an IP address that is not authorized.
	ErrUnauthorizedIPAddress string = "ErrUnauthorizedIPAddress"

	// ================================
	// REQUEST VALIDATION
	// ================================
	//
	// ErrInvalidApiName is returned when the API name provided in the request is invalid.
	ErrInvalidApiName string = "ErrInvalidApiName"

	// ErrInvalidBodyFormat is returned when the request body is malformed or not in the expected format.
	ErrInvalidBodyFormat string = "ErrInvalidBodyFormat"

	// ErrInvalidDateRange is returned when the specified date range is invalid or not logically consistent.
	ErrInvalidDateRange string = "ErrInvalidDateRange"

	// ErrInvalidHeader is returned when one or more required headers are missing or invalid.
	ErrInvalidHeader string = "ErrInvalidHeader"

	// ErrInvalidMethod is returned when the HTTP method used for the request is not supported for this endpoint.
	ErrInvalidMethod string = "ErrInvalidMethod"

	// ErrInvalidParameter is returned when a provided request parameter is invalid, incorrectly formatted, or violates constraints.
	ErrInvalidParameter string = "ErrInvalidParameter"

	// ErrInvalidPayload is returned when the payload structure or content does not meet the API requirements.
	ErrInvalidPayload string = "ErrInvalidPayload"

	// ErrMissingHeader is returned when a required request header is missing.
	ErrMissingHeader string = "ErrMissingHeader"

	// ErrMissingParameter is returned when a required request parameter is missing.
	ErrMissingParameter string = "ErrMissingParameter"

	// ================================
	// CSR (CERTIFICATE SIGNING REQUEST)
	// ================================
	//
	// ErrInvalidCSR is returned when the CSR is invalid or cannot be parsed.
	ErrInvalidCSR string = "ErrInvalidCSR"

	// ErrInvalidCSRFormat is returned when the CSR is not in a recognized or valid format.
	ErrInvalidCSRFormat string = "ErrInvalidCSRFormat"

	// ErrInvalidCSREllipticCurve is returned when the CSR contains an unsupported or invalid elliptic curve.
	ErrInvalidCSREllipticCurve string = "ErrInvalidCSREllipticCurve"

	// ErrInvalidCSRKeyLength is returned when the key length in the CSR does not meet the required security constraints.
	ErrInvalidCSRKeyLength string = "ErrInvalidCSRKeyLength"

	// ErrInvalidCSRKeyType is returned when the CSR contains an unsupported or invalid key type.
	ErrInvalidCSRKeyType string = "ErrInvalidCSRKeyType"

	// ErrInvalidCSRSignature is returned when the CSR signature cannot be verified or is invalid.
	ErrInvalidCSRSignature string = "ErrInvalidCSRSignature"

	// ================================
	// RESOURCE & ROUTING
	// ================================
	//
	// ErrAlreadyExists is returned when the requested resource already exists and cannot be created again.
	ErrAlreadyExists string = "ErrAlreadyExists"

	// ErrInvalidRoute is returned when the endpoint or route being called is invalid or not recognized.
	ErrInvalidRoute string = "ErrInvalidRoute"

	// ErrMissingResource is returned when the requested resource does not exist or cannot be found.
	ErrMissingResource string = "ErrMissingResource"

	// ================================
	// BUSINESS / DOMAIN RULES
	// ================================
	//
	// ErrActionNotAllowedForAccountType is returned when the account type does not support the requested action.
	ErrActionNotAllowedForAccountType string = "ErrActionNotAllowedForAccountType"

	// ErrActionOutsideFundHours is returned when the requested action cannot be performed outside of fund operating hours.
	ErrActionOutsideFundHours string = "ErrActionOutsideFundHours"

	// ErrInsufficientBalance is returned when the account does not have sufficient balance to complete the operation.
	ErrInsufficientBalance string = "ErrInsufficientBalance"

	// ErrInvalidAccountExperience is returned when the account’s experience level does not meet the requirements for this action.
	ErrInvalidAccountExperience string = "ErrInvalidAccountExperience"

	// ErrInvalidRequestPolicy is returned when the request violates one or more policy constraints.
	ErrInvalidRequestPolicy string = "ErrInvalidRequestPolicy"

	// ErrRequestCannotBeCancelled is returned when the request cannot be cancelled due to its current state or business rules.
	ErrRequestCannotBeCancelled string = "ErrRequestCannotBeCancelled"

	// ErrSuitabilityAssessmentMissingForAccountCreation is returned when a suitability assessment is required but missing during account creation.
	ErrSuitabilityAssessmentMissingForAccountCreation string = "ErrSuitabilityAssessmentMissingForAccountCreation"

	// ErrSuitabilityAssessmentRequired is returned when a suitability assessment must be completed before this action is allowed.
	ErrSuitabilityAssessmentRequired string = "ErrSuitabilityAssessmentRequired"

	// ================================
	// RATE LIMITING & CANCELLATIONS
	// ================================
	//
	// ErrCancelledRequest is returned when the request was cancelled before completion.
	ErrCancelledRequest string = "ErrCancelledRequest"

	// ErrRateLimitExceeded is returned when too many requests were made in a short period; rate limit exceeded.
	ErrRateLimitExceeded string = "ErrRateLimitExceeded"

	// ================================
	// SERVER / INFRASTRUCTURE
	// ================================
	//
	// ErrInternal is returned when an unexpected internal server error occurs.
	ErrInternal string = "ErrInternal"

	// ErrServiceUnavailable is returned when a 3rd-party service is temporarily unavailable; try again later.
	ErrServiceUnavailable string = "ErrServiceUnavailable"
)
View Source
const (
	AccountTypeSingle string = "single"
	AccountTypeJoint  string = "joint"

	AccountExperienceFundManagement string = "fundmanagement"
	AccountExperienceMandate        string = "mandate"
	AccountExperienceDim            string = "dim"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	// Type specifies whether the address is "permanent" or "correspondence".
	Type string `json:"type,omitempty"`
	// Line1 is the first line of the address in text format.
	Line1 string `json:"line1,omitempty"`
	// Line2 is the second line of the address in text format.
	//
	// Optional.
	Line2 *string `json:"line2,omitempty"`
	// City is the city of the address.
	City string `json:"city,omitempty"`
	// Postcode is the postcode of the address.
	Postcode string `json:"postcode,omitempty"`
	// Status is the status of the address.
	//
	// Optional.
	State *string `json:"state,omitempty"`
	// Country is the country of the address.
	Country string `json:"country,omitempty"`
}

type AllocationPerformance

type AllocationPerformance struct {
	Date                 string  `json:"date,omitempty"`
	Units                float64 `json:"units,omitempty"`
	Asset                string  `json:"asset,omitempty"`
	NetAssetValuePerUnit float64 `json:"netAssetValuePerUnit,omitempty"`
	Value                float64 `json:"value,omitempty"`
	PostFeeAmount        float64 `json:"postFeeAmount,omitempty"`
}

type Balance

type Balance struct {
	FundID                    string   `json:"fundId,omitempty"`
	FundClassSequence         int      `json:"fundClassSequence,omitempty"`
	FundName                  string   `json:"fundName,omitempty"`
	FundShortName             string   `json:"fundShortName,omitempty"`
	FundClassLabel            string   `json:"fundClassLabel,omitempty"`
	FundCode                  string   `json:"fundCode,omitempty"`
	FundImageUrl              string   `json:"fundImageUrl,omitempty"`
	Units                     float64  `json:"units,omitempty"`
	Asset                     string   `json:"asset,omitempty"`
	Value                     float64  `json:"value,omitempty"`
	ValuedAt                  string   `json:"valuedAt,omitempty"`
	MinimumRedemptionAmount   float64  `json:"minimumRedemptionAmount,omitempty"`
	MinimumRedemptionUnits    float64  `json:"minimumRedemptionUnits,omitempty"`
	MinimumSubscriptionAmount float64  `json:"minimumSubscriptionAmount,omitempty"`
	MinimumSubscriptionUnits  float64  `json:"minimumSubscriptionUnits,omitempty"`
	RedemptionFeePercentage   float64  `json:"redemptionFeePercentage,omitempty"`
	SwitchFeePercentage       float64  `json:"switchFeePercentage,omitempty"`
	AvailableModes            []string `json:"availableModes"`
	IsOutOfService            bool     `json:"isOutOfService"`
	OutOfServiceMessage       string   `json:"outOfServiceMessage,omitempty"`
}

type Bank

type Bank struct {
	Name     string `json:"name,omitempty"`
	Bic      string `json:"bic,omitempty"`
	ImageUrl string `json:"imageUrl,omitempty"`
	Rank     int    `json:"rank,omitempty"`
}

type BankAccount

type BankAccount struct {
	AccountNumber   string `json:"accountNumber,omitempty"`
	AccountName     string `json:"accountName,omitempty"`
	AccountCurrency string `json:"accountCurrency,omitempty"`
	AccountType     string `json:"accountType,omitempty"`
	BankName        string `json:"bankName,omitempty"`
	BankBic         string `json:"bankBic,omitempty"`
	ReferenceNumber string `json:"referenceNumber,omitempty"`
	ImageUrl        string `json:"imageUrl,omitempty"`
	Status          string `json:"status,omitempty"`
	Source          string `json:"source,omitempty"`
	CreatedAt       string `json:"createdAt,omitempty"`
	CreatedBy       string `json:"createdBy,omitempty"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...*Options) *Client

func (*Client) CreateClientBankAccount

func (c *Client) CreateClientBankAccount(ctx context.Context, input *CreateClientBankAccountInput) (output *CreateClientBankAccountOutput, err error)

CreateClientBankAccount registers a new bank account with the client's profile for receiving redemption proceeds.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/command" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "create_client_bank_account",
  "payload": {
    "bankAccount": {
      "accountNumber": "<accountNumber>",
      "accountName": "<accountName>",
      "accountCurrency": "<accountCurrency>",
      "accountType": "<accountType>",
      "accountType": "<accountType>",
      "bankName": "<bankName>",
      "bankBic": "<bankBic>",
      "referenceNumber": "<referenceNumber>",
      "imageUrl": "<imageUrl>",
      "status": "<status>",
      "source": "<source>"
    }
  }
}'

Errors:

func (*Client) CreateInvestmentRequest

func (c *Client) CreateInvestmentRequest(ctx context.Context, input *CreateInvestmentRequestInput) (output *CreateInvestmentRequestOutput, err error)

CreateInvestmentRequest submits a new investment request to purchase units in a specified fund class with the provided amount.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/command" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "create_investment_request",
  "payload": {
    "accountId": "<accountId>",
    "fundId": "<fundId>",
    "fundClassSequence": <fundClassSequence>
    "amount": <amount>,
    "consentFundIM": <consentFundIM>,
    "consentHighRisk": <consentHighRisk>,
    "consents": {
      "IM": true
    },
    "voucherCode": <voucherCode>
  }
}'

Errors:

func (*Client) CreateRedemptionRequest

func (c *Client) CreateRedemptionRequest(ctx context.Context, input *CreateRedemptionRequestInput) (output *CreateRedemptionRequestOutput, err error)

CreateRedemptionRequest submits a new redemption request to sell fund units or withdraw an amount from an account.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/command" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "create_redemption_request",
  "payload": {
    "accountId": "<accountId>",
    "fundId": "<fundId>",
    "fundClassSequence": <fundClassSequence>
    "requestedAmount": <amount>,
    "units": <units>,
    "toBankAccountNumber": "<toBankAccountNumber>"
  }
}'

Errors:

func (*Client) CreateRequestCancellation

func (c *Client) CreateRequestCancellation(ctx context.Context, input *CreateRequestCancellationInput) (output *CreateRequestCancellationOutput, err error)

CreateRequestCancellation cancels a pending transaction request (investment, redemption, or switch) before it is executed.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/command" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "create_request_cancellation",
  "payload": {
    "accountId": "<accountId>",
    "requestId": "<requestId>"
  }
}'

Errors:

func (*Client) CreateSuitabilityAssessment

func (c *Client) CreateSuitabilityAssessment(ctx context.Context, input *CreateSuitabilityAssessmentInput) (output *CreateSuitabilityAssessmentOutput, err error)

CreateSuitabilityAssessment submits a new risk suitability assessment for the client, evaluating investment risk tolerance.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/command" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "create_suitability_assessment",
  "payload": {
    "suitabilityAssessment": {
      "id": "<id>",
      "clientId": "<clientId>",
      "source": "<source>",
      "investmentExperience": "<investmentExperience>",
      "investmentObjective": "<investmentObjective>",
      "investmentHorizon": "<investmentHorizon>",
      "currentInvestment": "<currentInvestment>",
      "returnExpectations": "<returnExpectations>",
      "attachment": "<attachment>",
      "totalScore": <totalScore>,
      "riskTolerance": "<riskTolerance>"
    }
  }
}'

Errors:

func (*Client) CreateSwitchRequest

func (c *Client) CreateSwitchRequest(ctx context.Context, input *CreateSwitchRequestInput) (output *CreateSwitchRequestOutput, err error)

CreateSwitchRequest submits a request to transfer units from one fund to another within the same account.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/command" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "create_switch_request",
  "payload": {
    "accountId": "<accountId>",
    "switchFromFundId": "<switchFromFundId>",
    "switchFromFundClassSequence": <fundClassSequence>,
    "switchToFundId": "<switchToFundId>",
    "switchToFundClassSequence": <switchToFundClassSequence>,
    "requestedAmount": <amount>,
    "units": <units>
  }
}'

Errors:

func (*Client) GetClientAccountAllocationPerformance

func (c *Client) GetClientAccountAllocationPerformance(ctx context.Context, input *GetClientAccountAllocationPerformanceInput) (output *GetClientAccountAllocationPerformanceOutput, err error)

GetClientAccountAllocationPerformance retrieves historical performance metrics for a specific fund allocation within an account over a defined timeframe.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "get_client_account_allocation_performance",
  "payload": {
    "accountId": "<accountId>",
    "allocationId": "<allocationId>",
    "type": "<type>",
    "fundClassSequence": "<fundClassSequence>",
    "timeframe": "<timeframe>",
    "interval": "<interval>"
  }
}'

Errors:

func (*Client) GetClientAccountRequestConfirmation

func (c *Client) GetClientAccountRequestConfirmation(ctx context.Context, input *GetClientAccountRequestConfirmationInput) (output *GetClientAccountRequestConfirmationOutput, err error)

GetClientAccountRequestConfirmation retrieves the confirmation document for a specific investment, redemption, or switch request.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "get_client_account_request_confirmation",
  "payload": {
    "accountId": "<accountId>",
    "requestId": "<requestId>",
    "format": "<format>"
  }
}'

Errors:

func (*Client) GetClientAccountRequestPolicy

func (c *Client) GetClientAccountRequestPolicy(ctx context.Context, input *GetClientAccountRequestPolicyInput) (output *GetClientAccountRequestPolicyOutput, err error)

GetClientAccountRequestPolicy retrieves the approval policy and participant information for a specific account request.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "get_client_account_request_policy",
  "payload": {
    "accountId": "<accountId>",
    "requestId": "<requestId>"
  }
}'

Errors:

func (*Client) GetClientAccountStatement

func (c *Client) GetClientAccountStatement(ctx context.Context, input *GetClientAccountStatementInput) (output *GetClientAccountStatementOutput, err error)

GetClientAccountStatement retrieves the account statement as a document (PDF or HTML) for transactions within a specified date range.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "get_client_account_statement",
  "payload": {
    "accountId": <accountId>,
    "fromDate": "<fromDate>",
    "toDate": "<toDate<",
    "format": "<format>"
  }
}'

Errors:

func (*Client) GetClientProfile

func (c *Client) GetClientProfile(ctx context.Context, input *GetClientProfileInput) (output *GetClientProfileOutput, err error)

GetClientProfile retrieves detailed profile information including personal and demographic data for the authenticated client.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "get_client_profile",
  "payload": {}
}'

Errors:

func (*Client) GetClientReferral

func (c *Client) GetClientReferral(ctx context.Context, input *GetClientReferralInput) (output *GetClientReferralOutput, err error)

GetClientReferral retrieves the client's referral code and the count of successfully referred clients.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "get_client_referral",
  "payload": {}
}'

Errors:

func (*Client) GetFund

func (c *Client) GetFund(ctx context.Context, input *GetFundInput) (output *GetFundOutput, err error)

GetFund retrieves detailed information about a specific fund including its characteristics, fees, and investment requirements.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "get_fund",
  "payload": {
    "fundId": "<fundId>"
  }
}'

Errors:

func (*Client) GetPreviewInvest

func (c *Client) GetPreviewInvest(ctx context.Context, input *GetPreviewInvestInput) (output *GetPreviewInvestOutput, err error)

GetPreviewInvest calculates a preview of an investment transaction, including applicable fees and any default voucher discounts.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "get_preview_invest",
  "payload": {
    "accountId": "<accountId>",
    "fundId": "<fundId>",
    "fundClassSequence": <fundClassSequence>,
    "amount": <amount>
  }
}'

Errors:

func (*Client) GetProjectedFundPrice

func (c *Client) GetProjectedFundPrice(ctx context.Context, input *GetProjectedFundPriceInput) (output *GetProjectedFundPriceOutput, err error)

GetProjectedFundPrice retrieves the current or projected unit net asset value (NAV) for a specific fund class.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "get_projected_fund_price",
  "payload": {
    "fundId": "<fundId>",
    "fundClassSequence": <fundClassSequence>
  }
}'

func (*Client) GetVoucher

func (c *Client) GetVoucher(ctx context.Context, input *GetVoucherInput) (output *GetVoucherOutput, err error)

GetVoucher retrieves details and validates a specific voucher code, calculating the discounted fees for an investment.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "get_voucher",
  "payload": {
    "accountId": "<accountId>",
    "fundId": "<fundId>",
    "fundClassSequence": <fundClassSequence>,
    "amount": <amount>,
    "voucherCode": "<voucherCode>"
  }
}'

Errors:

func (*Client) ListBanks

func (c *Client) ListBanks(ctx context.Context, input *ListBanksInput) (output *ListBanksOutput, err error)

ListBanks lists all banks supported by the platform for withdrawing funds.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_banks",
  "payload": {}
}'

Errors:

func (*Client) ListClientAccountBalance

func (c *Client) ListClientAccountBalance(ctx context.Context, input *ListClientAccountBalanceInput) (output *ListClientAccountBalanceOutput, err error)

ListClientAccountBalance lists the current holdings and balances for each fund allocation in a specific account.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_client_account_balance",
  "payload": {
    "accountId": "<accountId>"
  }
}'

Errors:

func (*Client) ListClientAccountPerformance

func (c *Client) ListClientAccountPerformance(ctx context.Context, input *ListClientAccountPerformanceInput) (output *ListClientAccountPerformanceOutput, err error)

ListClientAccountPerformance lists historical performance data for one or more client accounts over a specified timeframe.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_client_account_performance",
  "payload": {
    "accountIds": ["<accountId>", "<accountId>"],
    "timeframe": "<timeframe>",
    "interval": "<interval>"
  }
}'

Errors:

func (*Client) ListClientAccountRequests

func (c *Client) ListClientAccountRequests(ctx context.Context, input *ListClientAccountRequestsInput) (output *ListClientAccountRequestsOutput, err error)

ListClientAccountRequests lists all transaction requests (investments, redemptions, switches) for a specific account with optional filtering and pagination.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_client_account_requests",
  "payload": {
    "accountId": "<accountId>",
    "requestId": "<requestId>",
    "fundIds": ["<fundIds>"],
    "fromDate": "<fromDate>",
    "toDate": "<toDate>",
    "types": "<types>",
    "statuses": "<statuses>",
    "limit": <limit>,
    "offset": <offset>,
    "completedOnly": <completedOnly>,
  }
}'

Errors:

func (*Client) ListClientAccounts

func (c *Client) ListClientAccounts(ctx context.Context, input *ListClientAccountsInput) (output *ListClientAccountsOutput, err error)

ListClientAccounts lists all the accounts associated with the client.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_client_accounts",
  "payload": {
    "accountIds": ["<accountId>"]
  }
}'

Errors:

func (*Client) ListClientBankAccounts

func (c *Client) ListClientBankAccounts(ctx context.Context, input *ListClientBankAccountsInput) (output *ListClientBankAccountsOutput, err error)

ListClientBankAccounts lists all bank accounts registered to the client that can be used for fund transfers and redemptions.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_client_bank_accounts",
  "payload": {}
}'

Errors:

func (*Client) ListClientPromos

func (c *Client) ListClientPromos(ctx context.Context, input *ListClientPromosInput) (output *ListClientPromosOutput, err error)

ListClientPromos lists available promotional offers and vouchers that can be applied to client investments.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_client_promos",
  "payload": {}
}'

Errors:

func (*Client) ListClientSuitabilityAssessments

func (c *Client) ListClientSuitabilityAssessments(ctx context.Context, input *ListClientSuitabilityAssessmentsInput) (output *ListClientSuitabilityAssessmentsOutput, err error)

ListClientSuitabilityAssessments lists all suitability assessments completed by the client, including risk tolerance evaluations.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_client_suitability_assessments",
  "payload": {}
}'

Errors:

func (*Client) ListDisplayCurrencies

func (c *Client) ListDisplayCurrencies(ctx context.Context, input *ListDisplayCurrenciesInput) (output *ListDisplayCurrenciesOutput, err error)

ListDisplayCurrencies lists all available currencies that can be used to display portfolio values and transactions.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_display_currencies",
  "payload": {}
}'

Errors:

func (*Client) ListFundsForSubscription

func (c *Client) ListFundsForSubscription(ctx context.Context, input *ListFundsForSubscriptionInput) (output *ListFundsForSubscriptionOutput, err error)

ListFundsForSubscription lists all funds available for investment within a specific account based on the account's investor category and experience.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_funds_for_subscription",
  "payload": {
    "accountId": "<accountId>"
  }
}'

Errors:

func (*Client) ListInvestConsents

func (c *Client) ListInvestConsents(ctx context.Context, input *ListInvestConsentsInput) (output *ListInvestConsentsOutput, err error)

ListInvestConsents lists the required consent types that must be obtained before making an investment in a specific fund.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_invest_consents",
  "payload": {
    "accountId": "<accountId>",
    "fundId": "<fundId>",
    "fundClassSequence": <fundClassSequence>
  }
}'

Errors:

func (*Client) ListPaymentMethods

func (c *Client) ListPaymentMethods(ctx context.Context, input *ListPaymentMethodsInput) (output *ListPaymentMethodsOutput, err error)

ListPaymentMethods lists the available payment methods for fund transfers, such as DuitNow and bank transfers.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/query" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "list_payment_methods",
  "payload": {}
}'

Errors:

func (*Client) SetCredentials

func (c *Client) SetCredentials(keyID string, privateKeyPEM []byte)

SetCredentials sets credentials to the client instance. If wallet.Options.CredentialsLoaderFunc is set upon client's initialization then this is ignored.

func (*Client) UpdateAccountName

func (c *Client) UpdateAccountName(ctx context.Context, input *UpdateAccountNameInput) (output *UpdateAccountNameOutput, err error)

UpdateAccountName changes the friendly name or label of a specific client investment account.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/command" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "update_account_name",
  "payload": {
    "accountId": "<accountId>",
    "accountName": "<accountName>"
  }
}'

Errors:

func (*Client) UpdateClientProfile

func (c *Client) UpdateClientProfile(ctx context.Context, input *UpdateClientProfileInput) (output *UpdateClientProfileOutput, err error)

UpdateClientProfile updates the client's demographic information, ethnicity, and tax residency details.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/command" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "update_client_profile",
  "payload": {
    "ethnicity": "<ethnicity>",
    "otherEthnicity": "<otherEthnicity>",
    "domesticRinggitBorrowing": "<domesticRinggitBorrowing>",
    "taxResidency": "<taxResidency>",
    "countryTax": "<countryTax>",
    "taxIdentificationNo": "<taxIdentificationNo>"
  }
}'

Errors:

func (*Client) UpdateDisplayCurrency

func (c *Client) UpdateDisplayCurrency(ctx context.Context, input *UpdateDisplayCurrencyInput) (output *UpdateDisplayCurrencyOutput, err error)

UpdateDisplayCurrency changes the currency in which the client's portfolio values and transactions are displayed.

cURL:

curl -X "POST" "https://external-api.wallet.halogen.my/command" \
  -H 'Authorization: Bearer <JWT>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -d $'{
  "name": "update_display_currency",
  "payload": {
    "displayCurrency": "<displayCurrency>"
  }
}'

Errors:

type ClientAccount

type ClientAccount struct {
	// ID specifies the identifier of the account.
	ID string `json:"id,omitempty"`

	// Type specifies the type of the account.
	//
	// Value can be one of "single" or "joint".
	Type string `json:"type,omitempty"`

	// Name specifies the name of the account.
	Name string `json:"name,omitempty"`

	// Experience specifies the investing experience this account has.
	//
	// Value can be one of "fundmanagement", "mandate" or "dim".
	Experience string `json:"experience,omitempty"`

	// ExperienceLabel specifies a friendly name of the experience to
	// be shown on the UI.
	ExperienceLabel string `json:"experienceLabel,omitempty"`

	// Asset specifies the quote asset of the portfolio value and other related
	// fields such PnlAmount, NetInflow.
	Asset string `json:"asset,omitempty"`

	// PortfolioValue specifies the value of this account in Asset terms
	PortfolioValue float64 `json:"portfolioValue"`

	// ExposurePercentage specifies the exposure of this account relatively to the total
	// value of other accounts
	ExposurePercentage float64 `json:"exposurePercentage"`

	// PnlAmount specifies the profit or loss amount in Asset terms.
	//
	// The value will be negative when it is a loss.
	PnlAmount float64 `json:"pnlAmount"`

	// PnlAmount specifies the percentage of profit or loss relative
	// to the invested amount.
	//
	// The value will be negative when it is a loss.
	PnlPercentage float64 `json:"pnlPercentage"`

	// NetInflow specifies the net total traded in this account
	NetInflow float64 `json:"netInflow"`

	// TotalInflow specifies the total amount that has been injected
	// into this account.
	TotalInflow float64 `json:"totalInflow"`

	// TotalOutflow specifies the total amount that has been redeemed
	// from this account.
	TotalOutflow float64 `json:"totalOutflow"`

	// PendingSwitchInAmount specifies the total switching amount that is pending
	// confirmation.
	PendingSwitchInAmount float64 `json:"pendingSwitchInAmount"`

	RiskLabel       string `json:"riskLabel"`
	RiskDescription string `json:"riskDescription"`

	// CanInvest reports whether the requester can create investment request
	//
	// It is only available for "fundmanagement" experience
	CanInvest bool `json:"canInvest"`

	// CanRedeem reports whether the requester can create redemption request
	//
	// It is only available for "fundmanagement" experience
	CanRedeem bool `json:"canRedeem"`

	// CanSwitch reports whether the requester can create switch request
	//
	// It is only available for "fundmanagement" experience
	CanSwitch bool `json:"canSwitch"`

	// CanDeposit reports whether the requester can create deposit request
	//
	// It is only available for "dim" experience
	CanDeposit bool `json:"canDeposit"`

	// CanWithdraw reports whether the requester can create withdrawal request
	//
	// It is only available for "dim" experience
	CanWithdraw bool `json:"canWithdraw"`

	// CanUpdateAccountName reports whether the requester can update the account name
	CanUpdateAccountName bool `json:"canUpdateAccountName"`
}

ClientAccount represents Halogen investment account. One client may have many accounts.

Halogen offers two Types of accounts, "single" and "joint".

  • Single: Owned by one client, who is the the primary.
  • Joint: Owned by two clients, the first is the "primary", and the second is the "secondary". Secondary client may or may not have control over the account, however, funds can only be withdrawn to a bank account in the primary name.

Halogen offers three Experiences "fundmanagement", "mandate" and "dim".

  • Fund Management experience is meant for sophesticated investors who are eligible to invest in Public Wholesale Funds.
  • Mandate experience is meant for clients who have private mandates with Halogen.
  • DIM experience is meant for retail-investors who have diversifed automated portfolios with Halogen.

type ClientAccountPerformance

type ClientAccountPerformance struct {
	Date      string  `json:"date,omitempty"`
	AccountID string  `json:"accountId,omitempty"`
	Value     float64 `json:"value,omitempty"`
}

type ClientAccountRequest

type ClientAccountRequest struct {
	ID string `json:"id,omitempty"`
	// fundmanagement: investment, redemption, switch out, switch in
	// dim: deposit, withdrawal
	Type string `json:"type,omitempty"`

	FundID         string `json:"fundId,omitempty"`
	FundName       string `json:"fundName,omitempty"`
	FundShortName  string `json:"fundShortName,omitempty"`
	FundClassLabel string `json:"fundClassLabel,omitempty"`

	Asset                string   `json:"asset,omitempty"`
	Amount               float64  `json:"amount,omitempty"`
	PostFeeAmount        float64  `json:"postFeeAmount,omitempty"`
	Units                float64  `json:"units,omitempty"`
	UnitPrice            *float64 `json:"unitPrice,omitempty"`
	FeePercentage        float64  `json:"feePercentage,omitempty"`
	StrokedFeePercentage float64  `json:"strokedFeePercentage,omitempty"`
	FeeAmount            float64  `json:"feeAmount,omitempty"`
	RebateFromDate       string   `json:"rebateFromDate,omitempty"`
	RebateToDate         string   `json:"rebateToDate,omitempty"`
	Status               string   `json:"status,omitempty"`

	VoucherCode   *string `json:"voucherCode,omitempty"`
	ConsentType   *string `json:"consentType,omitempty"`
	ConsentStatus *string `json:"consentStatus,omitempty"`

	CollectionBankAccount *BankAccount `json:"collectionBankAccount,omitempty"`

	CreatedAt string `json:"createdAt,omitempty"`
}
type Consent struct {
	Name  string `json:"name,omitempty"`
	Label string `json:"label,omitempty"`
}

type CreateClientBankAccountInput

type CreateClientBankAccountInput struct {
	// BankAccount contains the details of the bank account to be created.
	BankAccount *BankAccount `json:"bankAccount,omitempty"`
}

CreateClientBankAccountInput represents the payload for adding a new bank account.

type CreateClientBankAccountOutput

type CreateClientBankAccountOutput struct {
}

CreateClientBankAccountOutput represents the response for adding a bank account (empty upon success).

type CreateInvestmentRequestInput

type CreateInvestmentRequestInput struct {
	// AccountID specifies the identifier of the client account for the investment.
	AccountID string `json:"accountId,omitempty"`
	// FundID specifies the identifier of the fund to invest in.
	FundID string `json:"fundId,omitempty"`
	// FundClassSequence specifies the class of the fund to invest in.
	FundClassSequence int `json:"fundClassSequence,omitempty"`
	// Amount specifies the amount to be invested.
	Amount float64 `json:"amount,omitempty"`

	// ConsentFundIM is deprecated, use Consents instead.
	ConsentFundIM bool `json:"consentFundIM,omitempty"`
	// ConsentHighRisk is deprecated, use Consents instead.
	ConsentHighRisk bool `json:"consentHighRisk,omitempty"`

	// Consents specifies a map of consent names to boolean values (true if consented).
	Consents map[string]bool `json:"consents,omitempty"`

	// VoucherCode specifies an optional voucher code to apply to the investment.
	VoucherCode string `json:"voucherCode,omitempty"`
}

CreateInvestmentRequestInput represents the payload for creating a new investment request.

type CreateInvestmentRequestOutput

type CreateInvestmentRequestOutput struct {
	// RequestID specifies the identifier of the created investment request.
	RequestID string `json:"requestId,omitempty"`
}

CreateInvestmentRequestOutput represents the response for an investment request.

type CreateRedemptionRequestInput

type CreateRedemptionRequestInput struct {
	// AccountID specifies the identifier of the client account.
	AccountID string `json:"accountId,omitempty"`
	// FundID specifies the identifier of the fund to redeem from.
	FundID string `json:"fundId,omitempty"`
	// FundClassSequence specifies the class of the fund to redeem from.
	FundClassSequence int `json:"fundClassSequence,omitempty"`
	// RequestedAmount specifies the amount to redeem.
	RequestedAmount float64 `json:"requestedAmount,omitempty"`
	// Units specifies the number of units to redeem.
	Units float64 `json:"units,omitempty"`
	// ToBankAccountNumber specifies the bank account number for the redemption proceeds.
	ToBankAccountNumber string `json:"toBankAccountNumber,omitempty"`
}

CreateRedeemRequestInput represents the payload for creating a new redemption (withdrawal) request.

type CreateRedemptionRequestOutput

type CreateRedemptionRequestOutput struct {
	// RequestID specifies the identifier of the created redemption request.
	RequestID string `json:"requestId,omitempty"`
}

CreateRedeemRequestOutput represents the response for a redemption request.

type CreateRequestCancellationInput

type CreateRequestCancellationInput struct {
	// AccountID specifies the identifier of the client account associated with the request.
	AccountID string `json:"accountId,omitempty"`
	// RequestID specifies the identifier of the request to cancel.
	RequestID string `json:"requestId,omitempty"`
}

CreateRequestCancellationInput represents the payload for canceling an existing request.

type CreateRequestCancellationOutput

type CreateRequestCancellationOutput struct {
}

CreateRequestCancellationOutput represents the response for a cancel request command (empty upon success).

type CreateSuitabilityAssessmentInput

type CreateSuitabilityAssessmentInput struct {
	// SuitabilityAssessment contains the details of the assessment being submitted.
	SuitabilityAssessment *SuitabilityAssessment `json:"suitabilityAssessment,omitempty"`
}

CreateSuitabilityAssessmentInput represents the payload for submitting a new suitability assessment.

type CreateSuitabilityAssessmentOutput

type CreateSuitabilityAssessmentOutput struct {
	// SuitabilityAssessmentID specifies the identifier of the created assessment.
	SuitabilityAssessmentID string `json:"suitabilityAssessmentId,omitempty"`
}

CreateSuitabilityAssessmentOutput represents the response for creating a suitability assessment.

type CreateSwitchRequestInput

type CreateSwitchRequestInput struct {
	// AccountID specifies the identifier of the client account.
	AccountID string `json:"accountId,omitempty"`

	// SwitchFromFundID specifies the fund ID to switch units *from*.
	SwitchFromFundID string `json:"switchFromFundId,omitempty"`
	// SwitchFromFundClassSequence specifies the fund class sequence to switch units *from*.
	SwitchFromFundClassSequence int `json:"switchFromFundClassSequence,omitempty"`
	// SwitchToFundID specifies the fund ID to switch units *to*.
	SwitchToFundID string `json:"switchToFundId,omitempty"`
	// SwitchToFundClassSequence specifies the fund class sequence to switch units *to*.
	SwitchToFundClassSequence int `json:"switchToFundClassSequence,omitempty"`

	// RequestedAmount specifies the amount to switch.
	RequestedAmount float64 `json:"requestedAmount,omitempty"`
	// Units specifies the number of units to switch.
	Units float64 `json:"units,omitempty"`
}

CreateSwitchRequestInput represents the payload for creating a new fund switch request.

type CreateSwitchRequestOutput

type CreateSwitchRequestOutput struct {
	// RequestID specifies the identifier of the created switch request.
	RequestID string `json:"requestId,omitempty"`
}

CreateSwitchRequestOutput represents the response for a switch request.

type DisplayCurrency

type DisplayCurrency struct {
	ID       string `json:"id,omitempty"`
	Label    string `json:"label,omitempty"`
	ImageUrl string `json:"imageUrl,omitempty"`
}

type Error

type Error struct {
	StatusCode int    `json:"statusCode"`
	Code       string `json:"code"`
	Message    string `json:"message"`
}

func (Error) Error

func (e Error) Error() string

type Fund

type Fund struct {
	// ID specifies the hexadecimal representation of the Fund identifier. 20 bytes
	// in length (40 hexadecimal characters).
	ID string `json:"id,omitempty"`

	// Type specifies the Fund type. Value is one of "income", "growth".
	Type string `json:"type,omitempty"`

	// Name specifies the legal name of the Fund.
	Name string `json:"name,omitempty"`

	// ShortName specifies the short name of the fund for better user experience.
	ShortName string `json:"shortName,omitempty"`

	// BaseCurrency specifies the fund's denmoinated currency.
	BaseCurrency string `json:"baseCurrency,omitempty"`

	// Category specifies the fund's category.
	Category string `json:"category,omitempty"`

	// Code specifies the fund's code. (e.g HSBTCF, HSETHF, HSCTF, HSRIF)
	Code string `json:"code,omitempty"`

	// InvestmentObjective specifies the objective of the fund as per the
	// information memorandum.
	InvestmentObjective string `json:"investmentObjective,omitempty"`
	// InvestorType specifies the type of the investor who can invest in this fund.
	InvestorType string `json:"investorType,omitempty"`

	// RiskRating specifies the amount of risk this fund has in text format. Value is one of
	// "low", "moderate", "high".
	RiskRating string `json:"riskRating,omitempty"`
	// RiskScore specifies the amount of risk this fund has in numeric format. Value is range
	// from 5 (low) to 16 (high).
	RiskScore int `json:"riskScore,omitempty"`

	// PrimaryFundManager specifies the name of the primary fund manager who
	// is managing the fund.
	PrimaryFundManager string `json:"primaryFundManager,omitempty"`
	// SecondaryFundManager specifies the name of the secondary fund manager who
	// is managing the fund.
	SecondaryFundManager string `json:"secondaryFundManager,omitempty"`

	// ShariahCompliant reports whether the fund is shariah compliant. True when it is shariah compliant.
	ShariahCompliant bool `json:"shariahCompliant,omitempty"`

	// Status specifies the status of the fund. Value is one of "pending", "active" or "archived".
	Status string `json:"status,omitempty"`

	// TagLine specifies the marketing line where it outlines the feature of the fund.
	TagLine string `json:"tagLine,omitempty"`

	// Trustee specifies the name of the trustee of the fund.
	Trustee string `json:"trustee,omitempty"`

	// ImageUrl specifies the Web URL that leads to the logo of the fund. For instance,
	// "https://media.halogen.my/fund/hsbtcf/logo.svg".
	ImageUrl string `json:"imageUrl,omitempty"`

	// CreatedAt specifies the date-time of which the fund was created on.
	CreatedAt string `json:"createdAt,omitempty"`

	// Classes specifies the fund's classes.
	Classes []FundClass `json:"classes,omitempty"`

	// IsOutOfService reports whether the fund is out of service. True when the fund is out of service.
	IsOutOfService bool `json:"isOutOfService"`
	// OutOfServiceMessage specifies the reason of which the fund is out of service.
	OutOfServiceMessage string `json:"outOfServiceMessage,omitempty"`

	// Metadata includes extra attributes related to the requester. For instance,
	// the minimum investment amount the requester must specify upon creating an investment request.
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

type FundClass

type FundClass struct {
	Sequence                    int                    `json:"sequence,omitempty"`
	Label                       string                 `json:"label,omitempty"`
	BaseCurrency                string                 `json:"baseCurrency,omitempty"`
	ManagementFee               float64                `json:"managementFee,omitempty"`
	TrusteeFee                  float64                `json:"trusteeFee,omitempty"`
	CustodianFee                float64                `json:"custodianFee,omitempty"`
	TransferFee                 float64                `json:"transferFee,omitempty"`
	TrusteeFeeAnnualMinimum     float64                `json:"trusteeFeeAnnualMinimum,omitempty"`
	SwitchingFee                float64                `json:"switchingFee,omitempty"`
	SubscriptionFee             float64                `json:"subscriptionFee,omitempty"`
	RedemptionFee               float64                `json:"redemptionFee,omitempty"`
	PerformanceFee              float64                `json:"performanceFee,omitempty"`
	TaxRate                     float64                `json:"taxRate,omitempty"`
	MinimumInitialInvestment    float64                `json:"minimumInitialInvestment,omitempty"`
	MinimumAdditionalInvestment float64                `json:"minimumAdditionalInvestment,omitempty"`
	MinimumUnitsHeld            float64                `json:"minimumUnitsHeld,omitempty"`
	MinimumRedemptionAmount     float64                `json:"minimumRedemptionAmount,omitempty"`
	CanDistribute               bool                   `json:"canDistribute,omitempty"`
	LaunchPrice                 float64                `json:"launchPrice,omitempty"`
	HexColor                    string                 `json:"hexColor,omitempty"`
	CommencementAt              string                 `json:"commencementAt,omitempty"`
	InitialOfferingPeriodFrom   string                 `json:"initialOfferingPeriodFrom,omitempty"`
	InitialOfferingPeriodTo     string                 `json:"initialOfferingPeriodTo,omitempty"`
	CreatedAt                   string                 `json:"createdAt,omitempty"`
	DistributionFrequency       string                 `json:"distributionFrequency,omitempty"`
	TagLine                     string                 `json:"tagLine,omitempty"`
	Metadata                    map[string]interface{} `json:"metadata,omitempty"`
}

type GetClientAccountAllocationPerformanceInput

type GetClientAccountAllocationPerformanceInput struct {
	AccountID         string `json:"accountId,omitempty"`
	AllocationID      string `json:"allocationId,omitempty"`
	Type              string `json:"type,omitempty"`
	FundClassSequence int    `json:"fundClassSequence,omitempty"`
	Timeframe         string `json:"timeframe,omitempty"`
	Interval          string `json:"interval,omitempty"`
}

type GetClientAccountAllocationPerformanceOutput

type GetClientAccountAllocationPerformanceOutput struct {
	Performance []AllocationPerformance `json:"performance"`
}

type GetClientAccountRequestConfirmationInput

type GetClientAccountRequestConfirmationInput struct {
	AccountID string `json:"accountId,omitempty"`
	RequestID string `json:"requestId,omitempty"`
	Format    string `json:"format,omitempty"`
}

type GetClientAccountRequestConfirmationOutput

type GetClientAccountRequestConfirmationOutput struct {
	Format   string `json:"format,omitempty"`
	Filename string `json:"filename,omitempty"`
	Bytes    []byte `json:"bytes,omitempty"`
}

type GetClientAccountRequestPolicyInput

type GetClientAccountRequestPolicyInput struct {
	AccountID string `json:"accountId"`
	RequestID string `json:"requestId"`
}

type GetClientAccountRequestPolicyOutput

type GetClientAccountRequestPolicyOutput struct {
	Groups       []PolicyGroup       `json:"groups"`
	Participants []PolicyParticipant `json:"participants"`
}

type GetClientAccountStatementInput

type GetClientAccountStatementInput struct {
	AccountID string `json:"accountId,omitempty"`
	FromDate  string `json:"fromDate,omitempty"`
	ToDate    string `json:"toDate,omitempty"`
	Format    string `json:"format"`
}

type GetClientAccountStatementOutput

type GetClientAccountStatementOutput struct {
	FromDate string `json:"fromDate,omitempty"`
	ToDate   string `json:"toDate,omitempty"`
	Format   string `json:"format,omitempty"`
	Filename string `json:"filename,omitempty"`
	Bytes    []byte `json:"bytes,omitempty"`
}

type GetClientProfileInput

type GetClientProfileInput struct {
}

type GetClientProfileOutput

type GetClientProfileOutput struct {
	// Name is the full name of the client as per official documents.
	//
	// Expect '/' to be part of the name.
	Name string `json:"name,omitempty"`

	// Nationality is the nationality of the client.
	Nationality *string `json:"nationality,omitempty"`

	// NricNo is the Malaysian NRIC number of the client.
	//
	// Only exists for Malaysian clients.
	NricNo *string `json:"nricNo,omitempty"`

	// PassportNp is the Passport number of the client.
	//
	// Only exists for Non-Malaysian clients.
	PassportNo *string `json:"passportNo,omitempty"`

	// Msisdn is the phone number of the client.
	Msisdn *string `json:"msisdn,omitempty"`

	// Email is the email of the client. Value is NULL for corporates.
	//
	// AuthorisedPersonEmail is used for corporates.
	Email *string `json:"email,omitempty"`

	// PermanentAddress is the permanent address of the client.
	PermanentAddress *Address `json:"permanentAddress,omitempty"`

	// CorrespondenceAddress is the correspondence address of the client.
	CorrespondenceAddress *Address `json:"correspondenceAddress,omitempty"`

	// Type specifies the client's type "individual" or "corporate".
	Type string `json:"type,omitempty"`

	// InvestorCategory specifies the investor category that can be one of "accreditedInvestor", "highNetworthInvestor",
	// "sophisticatedInvestor250k", "retailInvestor".
	//
	// 	- Accredited investor:
	// 		- Licensed CMSRL or Registered persons, including CEOs/Directors of CMSLs.
	// 		- Allowed to invest in Public Wholesale Fund, Private Mandate, DIM.
	//	- High net-worth investor:
	// 		- Annual Income of > RM300,000 (Individual)
	// 		- or > RM400,000 (Households)
	// 		- or > RM1,000,000 (investment portfolio)
	// 		- or > RM3,000,000 (net personal assets)
	// 		- Allowed to invest in Public Wholesale Fund, Private Mandate, DIM.
	//	- Sophisticated investor - RM 250k:
	// 		- Any investor who can invest RM250k or more for each transaction.
	// 		- Allowed to invest in Public Wholesale Fund, Private Mandate, DIM.
	//	- Retail investor:
	// 		- None of the above.
	// 		- Allowed to invest in Private Mandate, DIM.
	//
	InvestorCategory string `json:"investorCategory,omitempty"`

	// CountryOfIncoporation specifies the origin country of a corporate.
	//
	// This field is NULL for an individual client.
	CountryOfIncoporation *string `json:"countryOfIncorporation,omitempty"`

	// AuthorisedPersonName specifies the authorised person's name of a corporate.
	//
	// This field is NULL for an individual client.
	AuthorisedPersonName *string `json:"authorisedPersonName,omitempty"`

	// AuthorisedPersonEmail specifies the authorised person's email of a corporate.
	//
	// This field is NULL for an individual client.
	AuthorisedPersonEmail *string `json:"authorisedPersonEmail,omitempty"`

	// AuthorisedPersonMsisdn specifies the authorised person's phone number of a corporate.
	//
	// This field is NULL for an individual client.
	AuthorisedPersonMsisdn *string `json:"authorisedPersonMsisdn,omitempty"`

	// AuthorisedPersonOfficeNo specifies the authorised person's office phone number of a corporate.
	//
	// This field is NULL for an individual client.
	AuthorisedPersonOfficeNo *string `json:"authorisedPersonOfficeNo,omitempty"`

	// CompanyRegistrationNo specifies the registration number of a corporate.
	//
	// This field is NULL for an individual client.
	CompanyRegistrationNo *string `json:"companyRegistrationNo,omitempty"`

	// OldCompanyRegistrationNo specifies the old format of the registration number of a corporate.
	//
	// This field is NULL for an individual client.
	OldCompanyRegistrationNo *string `json:"oldCompanyRegistrationNo,omitempty"`

	// Ethnicity specifies the ethnicity of the client. Value is one of "bumiputera", "chinese",
	// "indian" or "other".
	//
	// Field is filled post registration.
	Ethnicity *string `json:"ethnicity,omitempty"`

	// DomesticRinggitBorrowing specifies the domestic ringgit borrowing status of the client. Value
	// is one of "residentWithoutDrbOrNonResidentOfMalaysia", "residentWithDRBButNotExceeded1M" or "residentWithDRBExceeded1M".
	//
	// Field is filled post registration.
	DomesticRinggitBorrowing *string `json:"domesticRinggitBorrowing,omitempty"`

	// TaxResidency specifies the tax residency of the client. Value is one of "onlyMalaysia", "multiple"
	// or "nonMalaysia".
	//
	// Field is filled post registration.
	TaxResidency *string `json:"taxResidency,omitempty"`

	// CountryTax specifies the country which the client pays tax to. Value is free-text country name.
	//
	// Field is filled post registration.
	CountryTax *string `json:"countryTax,omitempty"`

	// TaxIdentificationNo specifies the tax account number of the client. Value is free-text.
	//
	// Field is filled post registration.
	TaxIdentificationNo *string `json:"taxIdentificationNo,omitempty"`

	// IncompleteProfile reports whether the client's profile incomplete.
	//
	// False when all fields filled.
	IncompleteProfile bool `json:"incompleteProfile"`

	// IsAccountOwner reports whether the requester is the account owner. False when the requester
	// is acting on behalf the account's owner.
	IsAccountOwner bool `json:"isAccountOwner"`

	// CanInvestInUnitTrust reports whether the requester can invest in unit trust funds.
	CanInvestInUnitTrust bool `json:"canInvestInUnitTrust"`

	// CanInvestInDim reports whether the requester can invest in dim.
	CanInvestInDim bool `json:"canInvestInDim"`

	// CanUpdateProfile reports whether the requester can update and complete the profile.
	CanUpdateProfile bool `json:"canUpdateProfile"`

	// CanSubscribePushNotification reports whether the requester can subscribe to push notifications.
	CanSubscribePushNotification bool `json:"canSubscribePushNotification"`

	// Status specifies the status of the client's profile. Value is one of "pending", "rejected",
	// "active" or "withdrawn".
	Status string `json:"status,omitempty"`
}

type GetClientReferralInput

type GetClientReferralInput struct {
}

type GetClientReferralOutput

type GetClientReferralOutput struct {
	ReferralCode         string `json:"referralCode,omitempty"`
	ReferredClientsCount int    `json:"referredClientsCount"`
}

type GetFundInput

type GetFundInput struct {
	FundID string `json:"fundId,omitempty"`
}

type GetFundOutput

type GetFundOutput struct {
	Fund *Fund `json:"fund,omitempty"`
}

type GetPreviewInvestInput

type GetPreviewInvestInput struct {
	AccountID         string  `json:"accountId,omitempty"`
	FundID            string  `json:"fundId,omitempty"`
	FundClassSequence int     `json:"fundClassSequence,omitempty"`
	Amount            float64 `json:"amount,omitempty"`
}

type GetPreviewInvestOutput

type GetPreviewInvestOutput struct {
	StrokedSubscriptionFeePercentage float64           `json:"strokedSubscriptionFeePercentage"`
	AppliedSubscriptionFeePercentage float64           `json:"appliedSubscriptionFeePercentage"`
	PostFeeAmount                    float64           `json:"postFeeAmount"`
	FeeAmount                        float64           `json:"feeAmount"`
	DefaultVoucher                   *GetVoucherOutput `json:"defaultVoucher,omitempty"`
}

type GetProjectedFundPriceInput

type GetProjectedFundPriceInput struct {
	FundID            string `json:"fundId,omitempty"`
	FundClassSequence int    `json:"fundClassSequence,omitempty"`
}

type GetProjectedFundPriceOutput

type GetProjectedFundPriceOutput struct {
	Asset                string  `json:"asset"`
	NetAssetValuePerUnit float64 `json:"netAssetValuePerUnit"`
}

type GetVoucherInput

type GetVoucherInput struct {
	AccountID         string  `json:"accountId,omitempty"`
	FundID            string  `json:"fundId,omitempty"`
	FundClassSequence int     `json:"fundClassSequence,omitempty"`
	Amount            float64 `json:"amount,omitempty"`
	VoucherCode       *string `json:"voucherCode,omitempty"`
}

type GetVoucherOutput

type GetVoucherOutput struct {
	Valid                            bool    `json:"valid"`
	Code                             string  `json:"code"`
	StrokedSubscriptionFeePercentage float64 `json:"strokedSubscriptionFeePercentage"`
	AppliedSubscriptionFeePercentage float64 `json:"appliedSubscriptionFeePercentage"`
	VoucherDiscountPercentage        float64 `json:"voucherDiscountPercentage"`
	FeeAmount                        float64 `json:"feeAmount"`
	PostFeeAmount                    float64 `json:"postFeeAmount"`
}

type ListBanksInput

type ListBanksInput struct {
}

type ListBanksOutput

type ListBanksOutput struct {
	Banks []Bank `json:"banks"`
}

type ListClientAccountBalanceInput

type ListClientAccountBalanceInput struct {
	AccountID string `json:"accountId,omitempty"`
}

type ListClientAccountBalanceOutput

type ListClientAccountBalanceOutput struct {
	Balance []*Balance `json:"balance,omitempty"`
}

type ListClientAccountPerformanceInput

type ListClientAccountPerformanceInput struct {
	AccountIDs []string `json:"accountIds,omitempty"`
	Timeframe  string   `json:"timeframe,omitempty"`
	Interval   string   `json:"interval,omitempty"`
}

type ListClientAccountPerformanceOutput

type ListClientAccountPerformanceOutput struct {
	Performance []ClientAccountPerformance `json:"performance,omitempty"`
}

type ListClientAccountRequestsInput

type ListClientAccountRequestsInput struct {
	AccountID string  `json:"accountId,omitempty"`
	RequestID *string `json:"requestId,omitempty"`
	// Deprecated: Use FundIDs instead.
	FundID        *string   `json:"fundId,omitempty"`
	FundIDs       []*string `json:"fundIds,omitempty"`
	FromDate      *string   `json:"fromDate,omitempty"`
	ToDate        *string   `json:"toDate,omitempty"`
	Types         []*string `json:"types,omitempty"`
	Statuses      []*string `json:"statuses,omitempty"`
	Limit         *int      `json:"limit,omitempty"`
	Offset        *int      `json:"offset,omitempty"`
	CompletedOnly bool      `json:"completedOnly,omitempty"`
}

type ListClientAccountRequestsOutput

type ListClientAccountRequestsOutput struct {
	Requests []ClientAccountRequest `json:"requests"`
}

type ListClientAccountsInput

type ListClientAccountsInput struct {
	// AccountIDs filters the list of returned accounts.
	//
	// Optional, if not set, all accounts associated with the client are returned.
	AccountIDs []string `json:"accountIds,omitempty"`
}

type ListClientAccountsOutput

type ListClientAccountsOutput struct {
	// Amount is the total value of all returned accounts.
	Amount float64 `json:"amount"`
	// Asset specifies the Amount's asset.
	//
	// In case the display currency is updated then the amount will be
	// converted to the display currency and this will hold the display currency value.
	Asset string `json:"asset,omitempty"`
	// CanCreateAccount reports whether the requester can create a new account under the client.
	CanCreateAccount bool `json:"canCreateAccount"`
	// Accounts is the list of accounts the client has access to. Filter may apply
	// using AccountIDs in the input.
	Accounts []ClientAccount `json:"accounts"`
}

type ListClientBankAccountsInput

type ListClientBankAccountsInput struct {
}

type ListClientBankAccountsOutput

type ListClientBankAccountsOutput struct {
	BankAccounts []BankAccount `json:"bankAccounts"`
}

type ListClientPromosInput

type ListClientPromosInput struct {
}

type ListClientPromosOutput

type ListClientPromosOutput struct {
	Promos []Promo `json:"promos"`
}

type ListClientSuitabilityAssessmentsInput

type ListClientSuitabilityAssessmentsInput struct {
}

type ListClientSuitabilityAssessmentsOutput

type ListClientSuitabilityAssessmentsOutput struct {
	ShouldAskSuitabilityAssessment bool                    `json:"shouldAskSuitabilityAssessment"`
	CanIgnoreSuitabilityAssessment bool                    `json:"canIgnoreSuitabilityAssessment"`
	Assessments                    []SuitabilityAssessment `json:"assessments"`
}

type ListDisplayCurrenciesInput

type ListDisplayCurrenciesInput struct {
}

type ListDisplayCurrenciesOutput

type ListDisplayCurrenciesOutput struct {
	DisplayCurrency string            `json:"displayCurrency,omitempty"`
	Currencies      []DisplayCurrency `json:"currencies"`
}

type ListFundsForSubscriptionInput

type ListFundsForSubscriptionInput struct {
	AccountID string `json:"accountId,omitempty"`
}

type ListFundsForSubscriptionOutput

type ListFundsForSubscriptionOutput struct {
	Funds []Fund `json:"funds"`
}

type ListInvestConsentsInput

type ListInvestConsentsInput struct {
	AccountID         string `json:"accountId,omitempty"`
	FundID            string `json:"fundId,omitempty"`
	FundClassSequence int    `json:"fundClassSequence,omitempty"`
}

type ListInvestConsentsOutput

type ListInvestConsentsOutput struct {
	Consents        []Consent `json:"consents"`
	ConsentFundIM   bool      `json:"consentFundIM,omitempty"`
	ConsentHighRisk bool      `json:"consentHighRisk,omitempty"`
}

type ListPaymentMethodsInput

type ListPaymentMethodsInput struct {
}

type ListPaymentMethodsOutput

type ListPaymentMethodsOutput struct {
	Duitnow      bool `json:"duitnow"`
	BankTransfer bool `json:"bankTransfer"`
}

type Options

type Options struct {
	// CredentialsLoaderFunc is responsible for retreiving credentials to enable the client
	// sending authenticated requests. This is recommended over [wallet.Client.SetCredentials] which
	// lets credentials live in memory along with Client instance.
	//
	// Optional, if set, credentials will be retrieved for every request, and
	// at best-effort cleared from the memory post call.
	CredentialsLoaderFunc func() (keyID string, privateKeyPEM []byte, err error)

	// HTTPClient specifies an HTTP client used to call the server
	//
	// Optional.
	HTTPClient *http.Client

	// MaxReadRetry specifies how many times to retry a query request when fails.
	//
	// Optional, defaulted to 5 times.
	MaxReadRetry int

	// RetryInterval specifies how long to wait before retrying a query request when fails.
	//
	// Optional, defaulted to 50 milliseconds.
	RetryInterval time.Duration

	// Debug reports whether the client is running in debug mode which enables logging.
	//
	// Optional, defaulted to false.
	Debug bool
}

type PolicyGroup

type PolicyGroup struct {
	Label string `json:"label,omitempty"`
	Min   int    `json:"min,omitempty"`
	Max   int    `json:"max,omitempty"`
}

type PolicyParticipant

type PolicyParticipant struct {
	Email      string `json:"email,omitempty"`
	GroupLabel string `json:"groupLabel,omitempty"`
	Name       string `json:"name,omitempty"`
	Signed     bool   `json:"signed,omitempty"`
	SignedAt   string `json:"signedAt,omitempty"`
}

type Promo

type Promo struct {
	AccountID          string  `json:"accountId,omitempty"`
	AccountName        string  `json:"accountName,omitempty"`
	Code               string  `json:"code,omitempty"`
	Label              string  `json:"label,omitempty"`
	Description        string  `json:"description,omitempty"`
	DiscountPercentage float64 `json:"discountPercentage,omitempty"`
	DiscountFrom       string  `json:"discountFrom,omitempty"`
	ValidFromDate      *string `json:"validFromDate,omitempty"`
	ValidToDate        *string `json:"validToDate,omitempty"`
	CreatedAt          string  `json:"createdAt,omitempty"`
}

type SuitabilityAssessment

type SuitabilityAssessment struct {
	ID                   string `json:"id,omitempty"`
	ClientID             string `json:"clientId,omitempty"`
	Source               string `json:"source,omitempty"`
	InvestmentExperience string `json:"investmentExperience,omitempty"`
	InvestmentObjective  string `json:"investmentObjective,omitempty"`
	InvestmentHorizon    string `json:"investmentHorizon,omitempty"`
	CurrentInvestment    string `json:"currentInvestment,omitempty"`
	ReturnExpectations   string `json:"returnExpectations,omitempty"`
	Attachment           string `json:"attachment,omitempty"`
	TotalScore           int    `json:"totalScore,omitempty"`
	RiskTolerance        string `json:"riskTolerance,omitempty"`
	CreatedBy            string `json:"createdBy,omitempty"`
	CreatedAt            string `json:"createdAt,omitempty"`
}

type UpdateAccountNameInput

type UpdateAccountNameInput struct {
	// AccountID specifies the ID of the account to update.
	AccountID string `json:"accountId,omitempty"`
	// AccountName specifies the new name for the account.
	AccountName string `json:"accountName,omitempty"`
}

UpdateAccountNameInput represents the payload for changing a client account's name.

type UpdateAccountNameOutput

type UpdateAccountNameOutput struct {
}

UpdateAccountNameOutput represents the response for updating an account name (empty upon success).

type UpdateClientProfileInput

type UpdateClientProfileInput struct {
	// Ethnicity specifies the client's ethnicity. Value is one of "bumiputera", "chinese", "indian" or "other".
	Ethnicity string `json:"ethnicity,omitempty"`
	// OtherEthnicity is used if Ethnicity is "other" to specify the exact ethnicity.
	OtherEthnicity string `json:"otherEthnicity,omitempty"`

	// DomesticRinggitBorrowing specifies the client's domestic ringgit borrowing status.
	DomesticRinggitBorrowing string `json:"domesticRinggitBorrowing,omitempty"`
	// TaxResidency specifies the client's tax residency status. Value is one of "onlyMalaysia", "multiple" or "nonMalaysia".
	TaxResidency string `json:"taxResidency,omitempty"`
	// CountryTax specifies the country where the client pays tax.
	CountryTax string `json:"countryTax,omitempty"`
	// TaxIdentificationNo specifies the client's tax account number.
	TaxIdentificationNo string `json:"taxIdentificationNo,omitempty"`
}

UpdateClientProfileInput represents the payload for updating specific fields on the client's profile.

type UpdateClientProfileOutput

type UpdateClientProfileOutput struct {
}

UpdateClientProfileOutput represents the response for updating the client profile (empty upon success).

type UpdateDisplayCurrencyInput

type UpdateDisplayCurrencyInput struct {
	// DisplayCurrency specifies the new currency ID to be used for display.
	DisplayCurrency string `json:"displayCurrency,omitempty"`
}

UpdateDisplayCurrencyInput represents the payload for changing the client's display currency.

type UpdateDisplayCurrencyOutput

type UpdateDisplayCurrencyOutput struct {
}

UpdateDisplayCurrencyOutput represents the response for updating the display currency (empty upon success).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL