Versions in this module Expand all Collapse all v0 v0.1.2 Aug 3, 2023 v0.1.1 Aug 3, 2023 Changes in this version + const BalanceTypeTotal + const BalanceTypeTrading + const BalanceTypeVault + const OrderSideBuy + const OrderSideSell + const OrderTypeBlock + const OrderTypeLimit + const OrderTypeMarket + const OrderTypeTwap + const TimeInForceGoodUntilCancelled + const TimeInForceGoodUntilTime + const TimeInForceImmediateOrCancel + const WalletDepositTypeCrypto + const WalletDepositTypeSwift + const WalletDepositTypeWire + const WalletTypeOther + const WalletTypeTrading + const WalletTypeVault + func AdjustOrderSize(amount, baseMin, baseMax, baseIncrement decimal.Decimal) decimal.Decimal + func CalculateOrderSize(product *Product, amount decimal.Decimal, holds decimal.Decimal) (orderSize decimal.Decimal, err error) + func TimeToStr(t time.Time) string + type AccountMetadata struct + Consensus *Consensus + type Activity struct + AccountMetadata *AccountMetadata + Category string + Created string + CreatedBy string + Description string + Id string + OrdersMetadata *OrdersMetadata + PrimaryType string + ReferenceId string + SecondaryType string + Status string + Symbols []string + Title string + Updated string + UserActions []*UserAction + type AddressBookEntry struct + AccountIdentifier string + AccountIdentifierName string + Added time.Time + AddedBy *AddressBookEntryAddedBy + Address string + ExplorerLink string + Id string + LastUsed time.Time + Name string + State string + Symbol string + type AddressBookEntryAddedBy struct + AvatarUrl string + Id string + Name string + type Allocation struct + AvgPrice string + BaseQuantity string + Completed string + Destinations []*AllocationDestination + FeesAllocated string + OrderIds []string + ProductId string + QuoteValue string + ReversalId string + RootId string + Source string + Status string + UserId string + type AllocationDestination struct + AllocationBase string + AllocationQuote string + FeesAllocatedLeg string + LegId string + SourcePortfolioId string + type AllocationLeg struct + Amount string + DestinationPortfolioId string + LegId string + type Asset struct + DecimalPrecision string + ExplorerUrl string + Name string + Symbol string + TradingSupported bool + type Balance struct + Amount string + BondableAmount string + BondedAmount string + Holds string + PastRewardsAmount string + PendingRewardsAmount string + ReservedAmount string + Symbol string + UnbondingAmount string + UnvestedAmount string + WithdrawableAmount string + func (b Balance) AmountNum() (amount decimal.Decimal, err error) + func (b Balance) HoldsNum() (holds decimal.Decimal, err error) + type BalanceWithHolds struct + Holds string + Total string + type BlockchainAddress struct + AccountIdentifier string + Address string + type CancelOrderRequest struct + OrderId string + PortfolioId string + type CancelOrderResponse struct + OrderId string + Request *CancelOrderRequest + type Client struct + Credentials *Credentials + HttpBaseUrl string + HttpClient http.Client + func NewClient(credentials *Credentials, httpClient http.Client) *Client + func (c *Client) BaseUrl(u string) *Client + func (c Client) CancelOrder(ctx context.Context, request *CancelOrderRequest) (*CancelOrderResponse, error) + func (c Client) CreateAddressBookEntry(ctx context.Context, request *CreateAddressBookEntryRequest) (*CreateAddressBookEntryResponse, error) + func (c Client) CreateConversion(ctx context.Context, request *CreateConversionRequest) (*CreateConversionResponse, error) + func (c Client) CreateOrder(ctx context.Context, request *CreateOrderRequest) (*CreateOrderResponse, error) + func (c Client) CreateOrderPreview(ctx context.Context, request *CreateOrderRequest) (*CreateOrderPreviewResponse, error) + func (c Client) CreatePortfolioAllocations(ctx context.Context, request *CreatePortfolioAllocationsRequest) (*CreatePortfolioAllocationsResponse, error) + func (c Client) CreateWallet(ctx context.Context, request *CreateWalletRequest) (*CreateWalletResponse, error) + func (c Client) CreateWalletTransfer(ctx context.Context, request *CreateWalletTransferRequest) (*CreateWalletTransferResponse, error) + func (c Client) CreateWalletWithdrawal(ctx context.Context, request *CreateWalletWithdrawalRequest) (*CreateWalletWithdrawalResponse, error) + func (c Client) GetActivity(ctx context.Context, request *GetActivityRequest) (*GetActivityResponse, error) + func (c Client) GetAddressBook(ctx context.Context, request *GetAddressBookRequest) (*GetAddressBookResponse, error) + func (c Client) GetEntityPaymentMethod(ctx context.Context, request *GetEntityPaymentMethodRequest) (*GetEntityPaymentMethodResponse, error) + func (c Client) GetOrder(ctx context.Context, request *GetOrderRequest) (*GetOrderResponse, error) + func (c Client) GetPortfolio(ctx context.Context, request *GetPortfolioRequest) (*GetPortfolioResponse, error) + func (c Client) GetPortfolioAllocation(ctx context.Context, request *GetPortfolioAllocationRequest) (*GetPortfolioAllocationResponse, error) + func (c Client) GetPortfolioCommission(ctx context.Context, request *GetPortfolioCommissionRequest) (*GetPortfolioCommissionResponse, error) + func (c Client) GetPortfolioCredit(ctx context.Context, request *GetPortfolioCreditRequest) (*GetPortfolioCreditResponse, error) + func (c Client) GetTransaction(ctx context.Context, request *GetTransactionRequest) (*GetTransactionResponse, error) + func (c Client) GetWallet(ctx context.Context, request *GetWalletRequest) (*GetWalletResponse, error) + func (c Client) GetWalletBalance(ctx context.Context, request *GetWalletBalanceRequest) (*GetWalletBalanceResponse, error) + func (c Client) GetWalletDepositInstructions(ctx context.Context, request *GetWalletDepositInstructionsRequest) (*GetWalletDepositInstructionsResponse, error) + func (c Client) ListActivities(ctx context.Context, request *ListActivitiesRequest) (*ListActivitiesResponse, error) + func (c Client) ListAssets(ctx context.Context, request *ListAssetsRequest) (*ListAssetsResponse, error) + func (c Client) ListEntityUsers(ctx context.Context, request *ListEntityUsersRequest) (*ListEntityUsersResponse, error) + func (c Client) ListInvoices(ctx context.Context, request *ListInvoicesRequest) (*ListInvoicesResponse, error) + func (c Client) ListOpenOrders(ctx context.Context, request *ListOpenOrdersRequest) (*ListOpenOrdersResponse, error) + func (c Client) ListOrderFills(ctx context.Context, request *ListOrderFillsRequest) (*ListOrderFillsResponse, error) + func (c Client) ListOrders(ctx context.Context, request *ListOrdersRequest) (*ListOrdersResponse, error) + func (c Client) ListPortfolioAllocations(ctx context.Context, request *ListPortfolioAllocationsRequest) (*ListPortfolioAllocationsResponse, error) + func (c Client) ListPortfolioBalances(ctx context.Context, request *ListPortfolioBalancesRequest) (*ListPortfolioBalancesResponse, error) + func (c Client) ListPortfolioTransactions(ctx context.Context, request *ListPortfolioTransactionsRequest) (*ListPortfolioTransactionsResponse, error) + func (c Client) ListPortfolioUsers(ctx context.Context, request *ListPortfolioUsersRequest) (*ListPortfolioUsersResponse, error) + func (c Client) ListPortfolios(ctx context.Context, request *ListPortfoliosRequest) (*ListPortfoliosResponse, error) + func (c Client) ListProducts(ctx context.Context, request *ListProductsRequest) (*ListProductsResponse, error) + func (c Client) ListWalletBalances(ctx context.Context, request *ListWalletBalancesRequest) (*ListWalletBalancesResponse, error) + func (c Client) ListWalletTransactions(ctx context.Context, request *ListWalletTransactionsRequest) (*ListWalletTransactionsResponse, error) + func (c Client) ListWallets(ctx context.Context, request *ListWalletsRequest) (*ListWalletsResponse, error) + type Commission struct + Rate string + TradingVolume string + Type string + func (p Commission) RateNum() (rate decimal.Decimal, err error) + type Consensus struct + ApprovalDeadline string + PassedConsensus bool + type CreateAddressBookEntryRequest struct + AccountIdentifier string + Address string + Name string + PortfolioId string + Symbol string + type CreateAddressBookEntryResponse struct + ActivityId string + RemainingApprovals int32 + Request *CreateAddressBookEntryRequest + Type string + type CreateConversionRequest struct + Amount string + DestinationSymbol string + DestinationWalletId string + IdempotencyKey string + PortfolioId string + SourceSymbol string + SourceWalletId string + type CreateConversionResponse struct + ActivityId string + Amount string + DestinationSymbol string + DestinationWalletId string + Request *CreateConversionRequest + SourceSymbol string + SourceWalletId string + type CreateOrderPreviewResponse struct + Order *Order + Request *CreateOrderRequest + type CreateOrderRequest struct + Order *Order + type CreateOrderResponse struct + OrderId string + Request *CreateOrderRequest + type CreatePortfolioAllocationsRequest struct + AllocationId string + AllocationLegs []*AllocationLeg + OrderIds []string + ProductId string + RemainderDestinationPortfolioId string + SizeType string + SourcePortfolioId string + type CreatePortfolioAllocationsResponse struct + AllocationId string + FailureReason string + Request *CreatePortfolioAllocationsRequest + Success bool + type CreateWalletRequest struct + Name string + PortfolioId string + Symbol string + Type string + type CreateWalletResponse struct + ActivityId string + Name string + Request *CreateWalletRequest + Symbol string + Type string + type CreateWalletTransferRequest struct + Amount string + DestinationWalletId string + IdempotencyKey string + PortfolioId string + SourceWalletId string + Symbol string + type CreateWalletTransferResponse struct + ActivityId string + Amount string + ApprovalUrl string + DestinationAddress string + DestinationType string + Fee string + Request *CreateWalletTransferRequest + SourceAddress string + SourceType string + Symbol string + TransactionId string + type CreateWalletWithdrawalPaymentMethod struct + Id string + type CreateWalletWithdrawalRequest struct + Amount string + BlockchainAddress *BlockchainAddress + DestinationType string + IdempotencyKey string + PaymentMethod *CreateWalletWithdrawalPaymentMethod + PortfolioId string + SourceWalletId string + Symbol string + type CreateWalletWithdrawalResponse struct + ActivityId string + Amount string + ApprovalUrl string + Destination *BlockchainAddress + DestinationType string + Fee string + Request *CreateWalletWithdrawalRequest + Source *BlockchainAddress + SourceType string + Symbol string + TransactionId string + type Credentials struct + AccessKey string + EntityId string + Passphrase string + PortfolioId string + SigningKey string + SvcAccountId string + func ReadEnvCredentials(variableName string) (*Credentials, error) + func UnmarshalCredentials(b []byte) (*Credentials, error) + type CryptoDepositInstructions struct + AccountIdentifier string + Address string + Id string + Name string + Type string + type ErrorMessage struct + Value string + type FiatDepositInstructions struct + AccountNumber string + Id string + Name string + ReferenceCode string + RoutingNumber string + Type string + type GetActivityRequest struct + Id string + PortfolioId string + type GetActivityResponse struct + Activity *Activity + Request *GetActivityRequest + type GetAddressBookRequest struct + Pagination *PaginationParams + PortfolioId string + Search string + Symbol string + type GetAddressBookResponse struct + Addresses []*AddressBookEntry + Pagination *Pagination + Request *GetAddressBookRequest + type GetEntityPaymentMethodRequest struct + Id string + PaymentMethodId string + type GetEntityPaymentMethodResponse struct + AccountNumber string + BankCode string + Id string + Name string + PaymentMethodType string + Request *GetEntityPaymentMethodRequest + Symbol string + type GetOrderRequest struct + OrderId string + PortfolioId string + type GetOrderResponse struct + Order *Order + Request *GetOrderRequest + type GetPortfolioAllocationRequest struct + AllocationId string + PortfolioId string + type GetPortfolioAllocationResponse struct + Allocation *Allocation + Request *GetPortfolioAllocationRequest + type GetPortfolioCommissionRequest struct + PortfolioId string + type GetPortfolioCommissionResponse struct + Commission *Commission + Request *GetPortfolioCommissionRequest + type GetPortfolioCreditRequest struct + Id string + type GetPortfolioCreditResponse struct + PostTradeCredit *PostTradeCredit + Request *GetPortfolioCreditRequest + type GetPortfolioRequest struct + PortfolioId string + type GetPortfolioResponse struct + Portfolio *Portfolio + Request *GetPortfolioRequest + type GetTransactionRequest struct + PortfolioId string + TransactionId string + type GetTransactionResponse struct + Request *GetTransactionRequest + Transaction *Transaction + type GetWalletBalanceRequest struct + Id string + PortfolioId string + type GetWalletBalanceResponse struct + Balance *Balance + Request *GetWalletBalanceRequest + type GetWalletDepositInstructionsRequest struct + Id string + PortfolioId string + Type string + type GetWalletDepositInstructionsResponse struct + Crypto *CryptoDepositInstructions + Fiat *FiatDepositInstructions + Request *GetWalletDepositInstructionsRequest + type GetWalletRequest struct + Id string + PortfolioId string + type GetWalletResponse struct + Request *GetWalletRequest + Wallet *Wallet + type Invoice struct + BillingMonth int32 + BillingYear int32 + DueDate string + Id string + InvoiceNumber string + Items []*InvoiceItem + State string + UsdAmountOwed float64 + UsdAmountPaid float64 + type InvoiceItem struct + AverageAuc float64 + CurrencySymbol string + Description string + InvoiceType string + Price float64 + Quantity float64 + Rate float64 + Total float64 + Type string + type ListActivitiesRequest struct + Categories []string + End time.Time + Pagination *PaginationParams + PortfolioId string + Start time.Time + Statuses []string + Symbols []string + type ListActivitiesResponse struct + Activities []*Activity + Pagination *Pagination + Request *ListActivitiesRequest + type ListAssetsRequest struct + EntityId string + type ListAssetsResponse struct + Assets []*Asset + Request *ListAssetsRequest + type ListEntityUsersRequest struct + EntityId string + Pagination *PaginationParams + type ListEntityUsersResponse struct + Pagination *Pagination + Request *ListEntityUsersRequest + Users []*User + type ListInvoicesRequest struct + BillingMonth int32 + BillingYear int32 + EntityId string + Pagination *PaginationParams + States []string + type ListInvoicesResponse struct + Invoices []*Invoice + Pagination *Pagination + Request *ListInvoicesRequest + type ListOpenOrdersRequest struct + PortfolioId string + ProductId string + type ListOpenOrdersResponse struct + Orders []*Order + Request *ListOpenOrdersRequest + type ListOrderFillsRequest struct + OrderId string + Pagination *PaginationParams + PortfolioId string + type ListOrderFillsResponse struct + Fills []*OrderFill + Pagination *Pagination + Request *ListOrderFillsRequest + type ListOrdersRequest struct + End time.Time + OtherSide string + Pagination *PaginationParams + PortfolioId string + ProductIds []string + Start time.Time + Statuses []string + Type string + type ListOrdersResponse struct + Orders []*Order + Pagination *Pagination + Request *ListOrdersRequest + type ListPortfolioAllocationsRequest struct + End time.Time + Pagination *PaginationParams + PortfolioId string + ProductIds []string + Side string + Start time.Time + type ListPortfolioAllocationsResponse struct + Pagination *Pagination + Request *ListPortfolioAllocationsRequest + type ListPortfolioBalancesRequest struct + PortfolioId string + Symbols []string + Type string + type ListPortfolioBalancesResponse struct + Balances []*Balance + Request *ListPortfolioBalancesRequest + TradingWalletBalances *BalanceWithHolds + Type string + VaultWalletBalances *BalanceWithHolds + type ListPortfolioTransactionsRequest struct + End time.Time + Pagination *PaginationParams + PortfolioId string + Start time.Time + Symbols string + Types []string + type ListPortfolioTransactionsResponse struct + Pagination *Pagination + Request *ListPortfolioTransactionsRequest + Transactions []*Transaction + type ListPortfolioUsersRequest struct + Pagination *PaginationParams + PortfolioId string + type ListPortfolioUsersResponse struct + Pagination *Pagination + Request *ListPortfolioUsersRequest + Users []*User + type ListPortfoliosRequest struct + type ListPortfoliosResponse struct + Portfolios []*Portfolio + Request *ListPortfoliosRequest + type ListProductsRequest struct + Pagination *PaginationParams + PortfolioId string + type ListProductsResponse struct + Pagination *Pagination + Products []*Product + Request *ListProductsRequest + type ListWalletBalancesRequest struct + PortfolioId string + Symbols []string + Type string + type ListWalletBalancesResponse struct + Balances []*Balance + Request *ListWalletBalancesRequest + TradingWalletBalances *BalanceWithHolds + Type string + VaultWalletBalances *BalanceWithHolds + type ListWalletTransactionsRequest struct + End time.Time + Pagination *PaginationParams + PortfolioId string + Start time.Time + Symbols string + Types []string + WalletId string + type ListWalletTransactionsResponse struct + Pagination *Pagination + Request *ListWalletTransactionsRequest + Transactions []*Transaction + type ListWalletsRequest struct + Pagination *PaginationParams + PortfolioId string + Symbols []string + Type string + type ListWalletsResponse struct + Pagination *Pagination + Request *ListWalletsRequest + Wallets []*Wallet + func (r ListWalletsResponse) HasNext() bool + type Order struct + AverageFilledPrice string + BaseQuantity string + BestAsk string + BestBid string + ClientOrderId string + Commission string + Created string + DisplayBaseSize string + DisplayQuoteSize string + ExchangeFee string + ExpiryTime string + FilledQuantity string + FilledValue string + Id string + IsRaiseExact string + LimitPrice string + PortfolioId string + ProductId string + QuoteValue string + Side string + Slippage string + StartTime string + StpId string + TimeInForce string + Total string + Type string + UserId string + type OrderFill struct + Commission string + FilledQuantity string + FilledValue string + Id string + Price string + ProductId string + Side string + Time time.Time + Venue string + type OrdersMetadata struct + type Pagination struct + HasNext bool + NextCursor string + SortDirection string + type PaginationParams struct + Cursor string + Limit string + SortDirection string + type Portfolio struct + EntityId string + Id string + Name string + OrganizationId string + type PostTradeCredit struct + AdjustedCreditUtilized string + AdjustedEquity string + AmountsDue []*PostTradeCreditAmountDue + Available string + Currency string + Enabled bool + Frozen bool + FrozenReason string + Id string + Limit string + Utilized string + type PostTradeCreditAmountDue struct + Amount string + Currency string + DueDate time.Time + type Product struct + BaseIncrement string + BaseMaxSize string + BaseMinSize string + Id string + Permissions []string + QuoteIncrement string + QuoteMaxSize string + QuoteMinSize string + func (p Product) BaseIncrementNum() (amount decimal.Decimal, err error) + func (p Product) BaseMaxSizeNum() (amount decimal.Decimal, err error) + func (p Product) BaseMinSizeNum() (amount decimal.Decimal, err error) + func (p Product) QuoteIncrementNum() (amount decimal.Decimal, err error) + func (p Product) QuoteMaxSizeNum() (amount decimal.Decimal, err error) + func (p Product) QuoteMinSizeNum() (amount decimal.Decimal, err error) + type Transaction struct + Amount string + BlockchainIds []string + Completed time.Time + Created time.Time + DestinationSymbol string + FeeSymbol string + Fees string + Id string + NetworkFees string + PortfolioId string + Status string + Symbol string + TransactionId string + TransferFrom *Transfer + TransferTo *Transfer + Type string + WalletId string + type TransactionsMetadata struct + Consensus *Consensus + type Transfer struct + Type string + Value string + func (tr Transfer) ValueNum() (amount decimal.Decimal, err error) + type User struct + Email string + EntityId string + Id string + Name string + PortfolioId string + Role string + type UserAction struct + Action string + Timestamp string + TransactionsMetadata *TransactionsMetadata + UserId string + type Wallet struct + Created time.Time + Id string + Name string + Symbol string + Type string