allocations

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocationsService

type AllocationsService interface {
	CreatePortfolioAllocations(ctx context.Context, request *CreatePortfolioAllocationsRequest) (*CreatePortfolioAllocationsResponse, error)
	CreatePortfolioNetAllocations(ctx context.Context, request *CreatePortfolioNetAllocationsRequest) (*CreatePortfolioNetAllocationsResponse, error)
	ListPortfolioAllocations(ctx context.Context, request *ListPortfolioAllocationsRequest) (*ListPortfolioAllocationsResponse, error)
	GetPortfolioAllocation(ctx context.Context, request *GetPortfolioAllocationRequest) (*GetPortfolioAllocationResponse, error)
	GetPortfolioNetAllocation(ctx context.Context, request *GetPortfolioNetAllocationRequest) (*GetPortfolioNetAllocationResponse, error)
}

func NewAllocationsService

func NewAllocationsService(c client.RestClient) AllocationsService

type CreatePortfolioAllocationsRequest

type CreatePortfolioAllocationsRequest struct {
	AllocationId                    string                 `json:"allocation_id"`
	SourcePortfolioId               string                 `json:"source_portfolio_id"`
	ProductId                       string                 `json:"product_id"`
	OrderIds                        []string               `json:"order_ids"`
	AllocationLegs                  []*model.AllocationLeg `json:"allocation_legs"`
	SizeType                        string                 `json:"size_type"`
	RemainderDestinationPortfolioId string                 `json:"remainder_destination_portfolio"`
}

type CreatePortfolioAllocationsResponse

type CreatePortfolioAllocationsResponse struct {
	Success       bool                               `json:"success"`
	AllocationId  string                             `json:"allocation_id"`
	FailureReason string                             `json:"failure_reason"`
	Request       *CreatePortfolioAllocationsRequest `json:"request"`
}

type CreatePortfolioNetAllocationsRequest

type CreatePortfolioNetAllocationsRequest struct {
	NettingId                       string                 `json:"netting_id"`
	SourcePortfolioId               string                 `json:"source_portfolio_id"`
	ProductId                       string                 `json:"product_id"`
	OrderIds                        []string               `json:"order_ids"`
	AllocationLegs                  []*model.AllocationLeg `json:"allocation_legs"`
	SizeType                        string                 `json:"size_type"`
	RemainderDestinationPortfolioId string                 `json:"remainder_destination_portfolio"`
}

type CreatePortfolioNetAllocationsResponse

type CreatePortfolioNetAllocationsResponse struct {
	Success          bool                                  `json:"success"`
	NettingId        string                                `json:"netting_id"`
	FailureReason    string                                `json:"failure_reason"`
	BuyAllocationId  string                                `json:"buy_allocation_id"`
	SellAllocationId string                                `json:"sell_allocation_id"`
	Request          *CreatePortfolioNetAllocationsRequest `json:"request"`
}

type GetPortfolioAllocationRequest

type GetPortfolioAllocationRequest struct {
	PortfolioId  string `json:"portfolio_id"`
	AllocationId string `json:"allocation_id"`
}

type GetPortfolioAllocationResponse

type GetPortfolioAllocationResponse struct {
	Allocation *model.Allocation              `json:"allocation"`
	Request    *GetPortfolioAllocationRequest `json:"request"`
}

type GetPortfolioNetAllocationRequest

type GetPortfolioNetAllocationRequest struct {
	PortfolioId string `json:"portfolio_id"`
	NettingId   string `json:"netting_id"`
}

type GetPortfolioNetAllocationResponse

type GetPortfolioNetAllocationResponse struct {
	Allocations []*model.Allocation               `json:"allocations"`
	Request     *GetPortfolioNetAllocationRequest `json:"request"`
}

type ListPortfolioAllocationsRequest

type ListPortfolioAllocationsRequest struct {
	PortfolioId string                  `json:"portfolio_id"`
	ProductIds  []string                `json:"product_ids"`
	Side        string                  `json:"order_side"`
	Start       time.Time               `json:"start_date"`
	End         time.Time               `json:"end_date"`
	Pagination  *model.PaginationParams `json:"pagination_params"`
}

type ListPortfolioAllocationsResponse

type ListPortfolioAllocationsResponse struct {
	Request    *ListPortfolioAllocationsRequest `json:"request"`
	Pagination *model.Pagination                `json:"pagination"`
}

Jump to

Keyboard shortcuts

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