Documentation
¶
Index ¶
- Constants
- func AddActivityIdFlag(cmd *cobra.Command)
- func AddBaseQuantityFlag(cmd *cobra.Command)
- func AddClientOrderId(cmd *cobra.Command)
- func AddEntityIdFlag(cmd *cobra.Command)
- func AddIdempotencyKeyFlag(cmd *cobra.Command)
- func AddLimitPriceFlag(cmd *cobra.Command)
- func AddOrderSideFlag(cmd *cobra.Command)
- func AddOrderTypeFlag(cmd *cobra.Command)
- func AddPaginationFlags(cmd *cobra.Command, includeSortLimit bool)
- func AddPortfolioIdFlag(cmd *cobra.Command)
- func AddProductIdFlag(cmd *cobra.Command)
- func AddProductIdsFlag(cmd *cobra.Command)
- func AddQuoteValueFlag(cmd *cobra.Command)
- func AddSortDirectionFlag(cmd *cobra.Command)
- func AddStartEndFlags(cmd *cobra.Command)
- func AddWalletIdFlag(cmd *cobra.Command)
- func CheckFormatFlag(cmd *cobra.Command) (bool, error)
- func FormatResponseAsJson(cmd *cobra.Command, response interface{}) (string, error)
- func GetClientFromEnv() (client.RestClient, error)
- func GetContextWithTimeout() (context.Context, context.CancelFunc)
- func GetEntityId(cmd *cobra.Command, client client.RestClient) (string, error)
- func GetFlagBoolValue(cmd *cobra.Command, flagName string) bool
- func GetFlagStringValue(cmd *cobra.Command, flagName string) string
- func GetPaginationParams(cmd *cobra.Command) (*model.PaginationParams, error)
- func GetPortfolioId(cmd *cobra.Command, client client.RestClient) (string, error)
- func GetStartEndFlagsAsTime(cmd *cobra.Command) (time.Time, time.Time, error)
- func HandleListCmd(cmd *cobra.Command, callback ListCmdCallback) error
- func NewUuid() uuid.UUID
- func NewUuidStr() string
- func ParseDateRange(startStr, endStr string) (time.Time, time.Time, error)
- func PrintJsonDocs[T any](cmd *cobra.Command, items []T) error
- func ValidateOrderTypeAndLimitPrice(cmd *cobra.Command) error
- func ValidateQuantities(cmd *cobra.Command) error
- func ValidateSide(cmd *cobra.Command) error
- func ValidateTimeInForce(cmd *cobra.Command) error
- func ValidateUUID(uuid string) error
- func ValidateUUIDFlag(cmd *cobra.Command, flagName string) error
- type ListCmdCallback
Constants ¶
View Source
const ( OrderIdFlag = "order-id" ProductIdFlag = "product-id" GenericIdFlag = "id" ActivityIdFlag = "activity-id" TransactionIdFlag = "transaction-id" WalletIdFlag = "wallet-id" AddressFlag = "address" SymbolFlag = "symbol" NameFlag = "name" NetworkIdFlag = "network-id" NetworkTypeFlag = "network-type" NetworkFamilyFlag = "network-family" AccountIdFlag = "account-identifier" TypeFlag = "type" SideFlag = "side" BaseQuantityFlag = "base-quantity" QuoteValueFlag = "quote-value" LimitPriceFlag = "limit-price" StartTimeFlag = "start-time" ExpiryTimeFlag = "expiry-time" TimeInForceFlag = "time-in-force" SourceWalletIdFlag = "source-wallet-id" SourceSymbolFlag = "source-symbol" DestinationWalletIdFlag = "destination-wallet-id" DestinationSymbolFlag = "destination-symbol" AmountFlag = "amount" DestinationTypeFlag = "destination-type" DepositTypeFlag = "deposit-type" AllocationIdFlag = "allocation-id" NettingIdFlag = "netting-id" SizeTypeFlag = "size-type" SourcePortfolioIdFlag = "source-portfolio-id" RemainderDestPortfolioIdFlag = "remainder-destination-portfolio-id" OrderIdsFlag = "order-ids" AllocationLegsFlag = "allocation-legs" PaymentMethodIdFlag = "payment-method-id" BlockchainAddressFlag = "blockchain-address" AccountIdentifierFlag = "account-identifier" JsonIndent = " " SearchFlag = "search" LimitFlag = "limit" SortDirectionFlag = "sort-direction" SymbolsFlag = "symbols" ActivityLevelFlag = "activity-level" CategoriesFlag = "categories" StatusesFlag = "statuses" StartFlag = "start" EndFlag = "end" ProductIdsFlag = "product-ids" OrderStatusesFlag = "order-statuses" OrderTypeFlag = "order-type" OrderSideFlag = "order-side" TypesFlag = "types" OrderStatusOpen = "OPEN" OrderTypeMarket = "MARKET" OrderTypeLimit = "LIMIT" OrderTypeTwap = "TWAP" OrderTypeVwap = "VWAP" OrderSideBuy = "BUY" OrderSideSell = "SELL" InvoiceStatesFlag = "states" InvoiceBillingYear = "billing-year" InvoiceBillingMonth = "billing-month" TifFillOrKill = "FILL_OR_KILL" TifGoodUntilDateTime = "GOOD_UNTIL_DATE_TIME" TifGoodUntilCancelled = "GOOD_UNTIL_CANCELLED" TifImmediateOrCancel = "IMMEDIATE_OR_CANCEL" FormatFlag = "format" AllFlag = "all" InteractiveFlag = "interactive" PortfolioIdFlag = "portfolio-id" EntityIdFlag = "entity-id" IdempotencyKeyFlag = "idempotency-key" ClientOrderIdFlag = "client-order-id" ClientQuoteIdFlag = "client-quote-id" QuoteIdFlag = "quote-id" SettleCurrencyFlag = "settle-currency" DisableDynamicGasFlag = "disable-dynamic-gas" ReplacedTransactionIdFlag = "replaced-transaction-id" LimitDefault = "100" SortDirectionDefault = "DESC" RawUnsignedTransactionFlag = "raw-unsigned-transaction" SkipBroadcastFlag = "skip-broadcast" ChainIdFlag = "chain-id" UrlFlag = "url" )
Variables ¶
This section is empty.
Functions ¶
func AddActivityIdFlag ¶ added in v0.2.0
func AddBaseQuantityFlag ¶ added in v0.2.1
func AddClientOrderId ¶ added in v0.2.1
func AddEntityIdFlag ¶ added in v0.2.0
func AddIdempotencyKeyFlag ¶ added in v0.2.0
func AddLimitPriceFlag ¶ added in v0.2.1
func AddOrderSideFlag ¶ added in v0.2.0
func AddOrderTypeFlag ¶ added in v0.2.0
func AddPaginationFlags ¶ added in v0.2.0
func AddPortfolioIdFlag ¶ added in v0.2.0
func AddProductIdFlag ¶ added in v0.2.0
func AddProductIdsFlag ¶ added in v0.2.0
func AddQuoteValueFlag ¶ added in v0.2.1
func AddSortDirectionFlag ¶ added in v0.2.0
func AddStartEndFlags ¶ added in v0.2.0
func AddWalletIdFlag ¶ added in v0.2.1
func FormatResponseAsJson ¶
func GetClientFromEnv ¶
func GetClientFromEnv() (client.RestClient, error)
func GetContextWithTimeout ¶
func GetContextWithTimeout() (context.Context, context.CancelFunc)
func GetEntityId ¶
func GetPaginationParams ¶
func GetPaginationParams(cmd *cobra.Command) (*model.PaginationParams, error)
func GetPortfolioId ¶
func GetStartEndFlagsAsTime ¶ added in v0.2.0
func HandleListCmd ¶ added in v0.2.0
func HandleListCmd(cmd *cobra.Command, callback ListCmdCallback) error
func NewUuidStr ¶
func NewUuidStr() string
func ValidateQuantities ¶
func ValidateSide ¶
func ValidateTimeInForce ¶
func ValidateUUID ¶
Types ¶
type ListCmdCallback ¶ added in v0.2.0
type ListCmdCallback func(paginationParams *model.PaginationParams) (*model.Pagination, error)
Click to show internal directories.
Click to hide internal directories.