Documentation
¶
Index ¶
- Constants
- type AccountMetadata
- type Activity
- type AddressBookEntry
- type AddressBookEntryAddedBy
- type Allocation
- type AllocationDestination
- type AllocationLeg
- type Asset
- type AssetChange
- type Balance
- type BalanceWithHolds
- type BlockchainAddress
- type Commission
- type Consensus
- type CryptoDepositInstructions
- type EntityPaymentMethod
- type ErrorMessage
- type EstimatedNetworkFees
- type FiatDepositInstructions
- type Invoice
- type InvoiceItem
- type MatchMetadata
- type OnchainDetail
- type Order
- type OrderFill
- type OrdersMetadata
- type Pagination
- type PaginationParams
- type Portfolio
- type PostTradeCredit
- type PostTradeCreditAmountDue
- type Product
- 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 RiskAssessment
- type Transaction
- type TransactionMetadata
- type TransactionsMetadata
- type Transfer
- type User
- type UserAction
- type Wallet
Constants ¶
View Source
const ( WalletTypeVault = "VAULT" WalletTypeTrading = "TRADING" WalletTypeOther = "WALLET_TYPE_OTHER" WalletDepositTypeWire = "WIRE" WalletDepositTypeSwift = "SWIFT" WalletDepositTypeCrypto = "CRYPTO" BalanceTypeTrading = "TRADING_BALANCES" BalanceTypeVault = "VAULT_BALANCES" BalanceTypeTotal = "TOTAL_BALANCES" OrderSideBuy = "BUY" OrderSideSell = "SELL" OrderTypeMarket = "MARKET" OrderTypeLimit = "LIMIT" OrderTypeTwap = "TWAP" OrderTypeBlock = "BLOCK" TimeInForceGoodUntilTime = "GOOD_UNTIL_DATE_TIME" TimeInForceGoodUntilCancelled = "GOOD_UNTIL_CANCELLED" TimeInForceImmediateOrCancel = "IMMEDIATE_OR_CANCEL" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountMetadata ¶
type AccountMetadata struct {
Consensus *Consensus `json:"consensus"`
}
type Activity ¶
type Activity struct { Id string `json:"id"` ReferenceId string `json:"reference_id"` Category string `json:"category"` PrimaryType string `json:"type"` SecondaryType string `json:"secondary_type"` Status string `json:"status"` CreatedBy string `json:"created_by"` Title string `json:"title"` Description string `json:"description"` UserActions []*UserAction `json:"user_actions"` AccountMetadata *AccountMetadata `json:"account_metadata"` OrdersMetadata *OrdersMetadata `json:"orders_metadata"` Symbols []string `json:"symbols"` Created string `json:"created_at"` Updated string `json:"updated_at"` }
type AddressBookEntry ¶
type AddressBookEntry struct { Id string `json:"id"` Symbol string `json:"currency_symbol"` Name string `json:"name"` Address string `json:"address"` AccountIdentifier string `json:"account_identifier"` AccountIdentifierName string `json:"account_identifier_name"` State string `json:"state"` ExplorerLink string `json:"explorer_link"` LastUsed time.Time `json:"last_used_at"` Added time.Time `json:"added_at"` AddedBy *AddressBookEntryAddedBy `json:"added_by"` }
type AddressBookEntryAddedBy ¶
type Allocation ¶
type Allocation struct { RootId string `json:"root_id"` ReversalId string `json:"reversal_id"` Completed string `json:"allocation_completed_at"` UserId string `json:"user_id"` ProductId string `json:"product_id"` Side string `json:"side"` AvgPrice string `json:"avg_price"` BaseQuantity string `json:"base_quantity"` QuoteValue string `json:"quote_value"` FeesAllocated string `json:"fees_allocated"` Status string `json:"status"` Source string `json:"source"` OrderIds []string `json:"order_ids"` Destinations []*AllocationDestination `json:"destinations"` }
type AllocationDestination ¶
type AllocationLeg ¶
type AssetChange ¶ added in v0.2.1
type AssetChange struct {
Symbol string `json:"symbol,omitempty"`
}
type Balance ¶
type Balance struct { Symbol string `json:"symbol"` Amount string `json:"amount"` Holds string `json:"holds"` BondedAmount string `json:"bonded_amount"` ReservedAmount string `json:"reserved_amount"` UnbondingAmount string `json:"unbonding_amount"` UnvestedAmount string `json:"unvested_amount"` PendingRewardsAmount string `json:"pending_rewards_amount"` PastRewardsAmount string `json:"past_rewards_amount"` BondableAmount string `json:"bondable_amount"` WithdrawableAmount string `json:"withdrawable_amount"` }
type BalanceWithHolds ¶
type BlockchainAddress ¶
type Commission ¶
type EntityPaymentMethod ¶
type ErrorMessage ¶
type ErrorMessage struct {
Value string `json:"message"`
}
type EstimatedNetworkFees ¶ added in v0.2.1
type FiatDepositInstructions ¶
type Invoice ¶
type Invoice struct { Id string `json:"id"` BillingYear int32 `json:"billing_year"` BillingMonth int32 `json:"billing_month"` DueDate string `json:"due_date"` InvoiceNumber string `json:"invoice_number"` State string `json:"state"` UsdAmountPaid float64 `json:"usd_amount_paid"` UsdAmountOwed float64 `json:"usd_amount_owed"` Items []*InvoiceItem `json:"invoice_items"` }
type InvoiceItem ¶
type InvoiceItem struct { Description string `json:"description"` CurrencySymbol string `json:"currency_symbol"` InvoiceType string `json:"invoice_type"` Type string `json:"invoice_type"` Rate float64 `json:"rate"` Quantity float64 `json:"quantity"` Price float64 `json:"price"` AverageAuc float64 `json:"average_auc"` Total float64 `json:"total"` }
type MatchMetadata ¶ added in v0.2.1
type OnchainDetail ¶ added in v0.2.1
type OnchainDetail struct { SignedTransaction string `json:"signed_transaction"` RiskAssessment *RiskAssessment `json:"risk_assessment"` ChainId string `json:"chain_id"` Nonce string `json:"nonce"` ReplacedTransactionId string `json:"replaced_transaction_id"` DestinationAddress string `json:"destination_address"` SkipBroadcast bool `json:"skip_broadcast"` FailureReason string `json:"failure_reason"` SigningStatus string `json:"signing_status"` }
type Order ¶
type Order struct { PortfolioId string `json:"portfolio_id"` Side string `json:"side"` // A client-generated order ID used for reference purposes (note: order will be rejected if this ID // is not unique among all currently active orders) ClientOrderId string `json:"client_order_id"` ProductId string `json:"product_id"` Type string `json:"type"` // Order size in base asset units (either `base_quantity` or `quote_value` is required) BaseQuantity string `json:"base_quantity"` // Order size in quote asset units, i.e. the amount the user wants to spend (when buying) or receive (when selling); // the quantity in base units will be determined based on the market liquidity and indicated `quote_value` (either // `base_quantity` or `quote_value` is required) QuoteValue string `json:"quote_value,omitempty"` LimitPrice string `json:"limit_price,omitempty"` // The start time of the order in UTC (TWAP only) StartTime string `json:"start_time,omitempty"` // The expiry time of the order in UTC (TWAP and limit GTD only) ExpiryTime string `json:"expiry_time,omitempty"` TimeInForce string `json:"time_in_force,omitempty"` // An optional self trade prevention id (in the form of a UUID). The value is only honored for certain // clients who are permitted to specify a custom self trade prevention id StpId string `json:"stp_id,omitempty"` // Optionally specify a display size. This is the maximum order size that will show up on venue order books. // Specifying a value here effectively makes a LIMIT order into an "iceberg" style order. // This property only applies to LIMIT orders and will be ignored for other order types. DisplayQuoteSize string `json:"display_quote_size,omitempty"` DisplayBaseSize string `json:"display_base_size,omitempty"` // If you pass is_raise_exact = TRUE, you must use quote_value = n where n is the amount you want, // so $2000 will then cost you 1 ETH + fee, requiring > 1 ETH IsRaiseExact string `json:"is_raise_exact,omitempty"` // Used for describe order and create order preview Id string `json:"id,omitempty"` UserId string `json:"user_id,omitempty"` Created string `json:"created_at,omitempty"` FilledQuantity string `json:"filled_quantity,omitempty"` FilledValue string `json:"filled_value,omitempty"` AverageFilledPrice string `json:"average_filled_price,omitempty"` Commission string `json:"commission,omitempty"` ExchangeFee string `json:"exchange_fee,omitempty"` Total string `json:"order_total,omitempty"` BestBid string `json:"best_bid,omitempty"` BestAsk string `json:"best_ask,omitempty"` Slippage string `json:"slippage,omitempty"` }
type OrderFill ¶
type OrderFill struct { Id string `json:"id"` Side string `json:"side"` ProductId string `json:"product_id"` FilledQuantity string `json:"filled_quantity"` FilledValue string `json:"filled_value"` Price string `json:"price"` Time time.Time `json:"time"` Commission string `json:"commission"` Venue string `json:"venue"` }
type OrdersMetadata ¶
type OrdersMetadata struct{}
An empty/unimplemented/placeholder object in Prime
type Pagination ¶
type PaginationParams ¶
type PostTradeCredit ¶
type PostTradeCredit struct { Id string `json:"portfolio_id"` Currency string `json:"currency"` Limit string `json:"limit"` Utilized string `json:"utilized"` Available string `json:"available"` Frozen bool `json:"frozen"` AmountsDue []*PostTradeCreditAmountDue `json:"amounts_due"` FrozenReason string `json:"frozen_reason"` Enabled bool `json:"enabled"` AdjustedCreditUtilized string `json:"adjusted_credit_utilized"` AdjustedEquity string `json:"adjusted_portfolio_equity"` }
type Product ¶
type Product struct { Id string `json:"id"` BaseIncrement string `json:"base_increment"` QuoteIncrement string `json:"quote_increment"` BaseMinSize string `json:"base_min_size"` BaseMaxSize string `json:"base_max_size"` QuoteMinSize string `json:"quote_min_size"` QuoteMaxSize string `json:"quote_max_size"` Permissions []string `json:"permissions"` }
func (Product) BaseIncrementNum ¶
func (Product) BaseMaxSizeNum ¶
func (Product) BaseMinSizeNum ¶
func (Product) QuoteIncrementNum ¶
func (Product) QuoteMaxSizeNum ¶
type RiskAssessment ¶ added in v0.2.1
type Transaction ¶
type Transaction struct { Id string `json:"id"` WalletId string `json:"wallet_id"` PortfolioId string `json:"portfolio_id"` Type string `json:"type"` Status string `json:"status"` Symbol string `json:"symbol"` Created time.Time `json:"created_at"` Completed time.Time `json:"completed_at"` Amount string `json:"amount"` TransferFrom *Transfer `json:"transfer_from,omitempty"` TransferTo *Transfer `json:"transfer_to,omitempty"` NetworkFees string `json:"network_fees"` Fees string `json:"fees"` FeeSymbol string `json:"fee_symbol"` BlockchainIds []string `json:"blockchain_ids"` TransactionId string `json:"transaction_id"` DestinationSymbol string `json:"destination_symbol"` EstimatedNetworkFees *EstimatedNetworkFees `json:"estimated_network_fees,omitempty"` Network string `json:"network"` EstimatedAssetChanges []AssetChange `json:"estimated_asset_changes"` Metadata *TransactionMetadata `json:"metadata,omitempty"` IdempotencyKey string `json:"idempotency_key"` OnchainDetails *OnchainDetail `json:"onchain_details,omitempty"` }
type TransactionMetadata ¶ added in v0.2.1
type TransactionMetadata struct {
MatchMetadata *MatchMetadata `json:"match_metadata,omitempty"`
}
type TransactionsMetadata ¶
type TransactionsMetadata struct {
Consensus *Consensus `json:"consensus"`
}
type UserAction ¶
type UserAction struct { Action string `json:"action"` UserId string `json:"user_id"` Timestamp string `json:"timestamp"` TransactionsMetadata *TransactionsMetadata `json:"transactions_metadata"` }
Click to show internal directories.
Click to hide internal directories.