Documentation
¶
Index ¶
- func BuildParams(arguments []Argument, requireds ...string) (map[string]interface{}, error)
- func BuildQuery(params map[string]interface{}) string
- type AccountType
- type Argument
- func Address(val string) Argument
- func Amount(val string) Argument
- func AutoCommit(val bool) Argument
- func ClientOrderID(val string) Argument
- func Contingency(val ContingencyType) Argument
- func CreatedAt(val string) Argument
- func Currencies(val []string) Argument
- func Currency(val string) Argument
- func DepositAddressGenerationEnabled(val bool) Argument
- func Depth(val int) Argument
- func Description(val string) Argument
- func Destination(val AccountType) Argument
- func ExpireTime(val string) Argument
- func FeeRequests(val []FeeRequest) Argument
- func From(val string) Argument
- func FromCurrency(val string) Argument
- func GroupTransactions(val bool) Argument
- func ID(val string) Argument
- func IDFrom(val string) Argument
- func IDTill(val string) Argument
- func Identifier(val string) Argument
- func IdentifyBy(val IdentifyByType) Argument
- func IncludeFee(val bool) Argument
- func Limit(val int) Argument
- func MakeRate(val string) Argument
- func Mode(val SubscriptionModeType) Argument
- func NetworkCode(val string) Argument
- func NewClientOrderID(val string) Argument
- func Offset(val int) Argument
- func OrderBookSpeed(val OrderBookSpeedType) Argument
- func OrderBy(val OrderByType) Argument
- func OrderID(val int) Argument
- func OrderListID(val string) Argument
- func Orders(val []OrderRequest) Argument
- func Parameter(key string, val interface{}) Argument
- func PaymentID(val string) Argument
- func Period(val PeriodType) Argument
- func PostOnly(val bool) Argument
- func PreferredNetwork(val string) Argument
- func Price(val string) Argument
- func PriceRateSpeed(val PriceRateSpeedType) Argument
- func PublicComment(val string) Argument
- func Quantity(val string) Argument
- func RequestClientOrderID(val string) Argument
- func ShowSenders(val string) Argument
- func Side(val SideType) Argument
- func Since(val string) Argument
- func Sort(val SortType) Argument
- func SortBy(val SortByType) Argument
- func Source(val AccountType) Argument
- func StopPrice(val string) Argument
- func StrictValidate(val bool) Argument
- func SubAccountID(val string) Argument
- func SubAccountIDs(list ...string) Argument
- func Subscription(val SubscriptionType) Argument
- func Symbol(val string) Argument
- func Symbols(val []string) Argument
- func TakeRate(val string) Argument
- func TargetCurrency(val string) Argument
- func TickerSpeed(val TickerSpeedType) Argument
- func Till(val string) Argument
- func TimeInForce(val TimeInForceType) Argument
- func To(val string) Argument
- func ToCurrency(val string) Argument
- func TransactionStatuses(list ...TransactionStatusType) Argument
- func TransactionSubTypes(list ...TransactionSubTypeType) Argument
- func TransactionType(val TransactionTypeType) Argument
- func TransactionTypes(list ...TransactionTypeType) Argument
- func TransferType(val TransferTypeType) Argument
- func Untill(val string) Argument
- func UpdatedAt(val string) Argument
- func UseOffchain(val UseOffchainType) Argument
- func Volume(val string) Argument
- func WSDepth(val WSDepthType) Argument
- func WithdrawEnabled(val bool) Argument
- type ContingencyType
- type FeeRequest
- type IdentifyByType
- type MetaTransactionStatusType
- type NotificationType
- type OrderBookSpeedType
- type OrderByType
- type OrderRequest
- type OrderStatusType
- type OrderType
- type PeriodType
- type PriceRateSpeedType
- type ReportType
- type SideType
- type SortByType
- type SortType
- type SubscriptionModeType
- type SubscriptionType
- func SubscriptionTypeFullOrderbook(speed OrderBookSpeedType) SubscriptionType
- func SubscriptionTypeMiniTicker(speed OrderBookSpeedType) SubscriptionType
- func SubscriptionTypeMiniTickerInBatch(speed OrderBookSpeedType) SubscriptionType
- func SubscriptionTypeOrderbookTop(speed OrderBookSpeedType) SubscriptionType
- func SubscriptionTypeOrderbookTopInBatch(speed OrderBookSpeedType) SubscriptionType
- func SubscriptionTypePartialOrderbook(depth WSDepthType, speed OrderBookSpeedType) SubscriptionType
- func SubscriptionTypePartialOrderbookInBatch(depth WSDepthType, speed OrderBookSpeedType) SubscriptionType
- func SubscriptionTypeTicker(speed OrderBookSpeedType) SubscriptionType
- func SubscriptionTypeTickerInBatch(speed OrderBookSpeedType) SubscriptionType
- func SubscriptionTypeTrades() SubscriptionType
- func SubscriptionsTypeCandles(period PeriodType) SubscriptionType
- type SymbolStatusType
- type TickerSpeedType
- type TimeInForceType
- type TransactionStatusType
- type TransactionSubTypeType
- type TransactionTypeType
- type TransferTypeType
- type UseOffchainType
- type WSDepthType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildParams ¶
BuildParams makes a map with the Arguments functions, and check for the presence of "requireds" keys in the map, raising an error if some required keys are not present.
func BuildQuery ¶
Types ¶
type AccountType ¶
type AccountType string
AccountType is the type of account used for internal user tranfers
const ( AccountWallet AccountType = "wallet" AccountSpot AccountType = "spot" )
type Argument ¶
type Argument func(map[string]interface{})
Argument are functions that serves as arguments for the diferent requests to the server, either rest request, or websocket requests. Argument works by extending a given map with a particular key. For example Symbol("EOSETH") returns an Argument that extends a map assigning "EOSETH" to the key "symbol". usually, a function returning an Argument is what's used as a request parameter. just like the Symbol(val string) function in the example above.
func AutoCommit ¶
func ClientOrderID ¶
func Contingency ¶
func Contingency(val ContingencyType) Argument
func Currencies ¶
func Description ¶
func Destination ¶
func Destination(val AccountType) Argument
func ExpireTime ¶
func FeeRequests ¶
func FeeRequests(val []FeeRequest) Argument
func FromCurrency ¶
func GroupTransactions ¶ added in v3.2.0
func Identifier ¶
func IdentifyBy ¶
func IdentifyBy(val IdentifyByType) Argument
func IncludeFee ¶
func Mode ¶
func Mode(val SubscriptionModeType) Argument
func NetworkCode ¶
func NewClientOrderID ¶
func OrderBookSpeed ¶
func OrderBookSpeed(val OrderBookSpeedType) Argument
func OrderBy ¶ added in v3.2.0
func OrderBy(val OrderByType) Argument
func OrderListID ¶
func Orders ¶
func Orders(val []OrderRequest) Argument
func Period ¶
func Period(val PeriodType) Argument
func PreferredNetwork ¶
func PriceRateSpeed ¶
func PriceRateSpeed(val PriceRateSpeedType) Argument
func PublicComment ¶
func RequestClientOrderID ¶
func ShowSenders ¶
func SortBy ¶
func SortBy(val SortByType) Argument
func Source ¶
func Source(val AccountType) Argument
func StrictValidate ¶
func SubAccountID ¶
func SubAccountIDs ¶
func Subscription ¶
func Subscription(val SubscriptionType) Argument
func TargetCurrency ¶
func TickerSpeed ¶
func TickerSpeed(val TickerSpeedType) Argument
func TimeInForce ¶
func TimeInForce(val TimeInForceType) Argument
func ToCurrency ¶
func TransactionStatuses ¶
func TransactionStatuses(list ...TransactionStatusType) Argument
func TransactionSubTypes ¶
func TransactionSubTypes(list ...TransactionSubTypeType) Argument
func TransactionType ¶
func TransactionType(val TransactionTypeType) Argument
func TransactionTypes ¶
func TransactionTypes(list ...TransactionTypeType) Argument
func TransferType ¶
func TransferType(val TransferTypeType) Argument
func UseOffchain ¶
func UseOffchain(val UseOffchainType) Argument
func WSDepth ¶
func WSDepth(val WSDepthType) Argument
func WithdrawEnabled ¶
type ContingencyType ¶
type ContingencyType string
const ( ContingencyAllOrNone ContingencyType = "allOrNone" ContingencyAON ContingencyType = "allOrNone" ContingencyOneCancelOther ContingencyType = "oneCancelOther" ContingencyOCO ContingencyType = "oneCancelOther" ContingencyOTO ContingencyType = "oneTriggerOther" ContingencyOneTriggerOther ContingencyType = "oneTriggerOther" ContingencyOneTriggerOneCancelOther ContingencyType = "oneTriggerOneCancelOther" ContingencyOTOCO ContingencyType = "oneTriggerOneCancelOther" )
type FeeRequest ¶
type IdentifyByType ¶
type IdentifyByType string
IdentifyByType is the type of identifier used for transafers between users
const ( IdentifyByEmail IdentifyByType = "email" IdentifyByUsername IdentifyByType = "username" )
type MetaTransactionStatusType ¶
type MetaTransactionStatusType string
const ( MetaTransactionStatusActive MetaTransactionStatusType = "ACTIVE" MetaTransactionStatusInactive MetaTransactionStatusType = "INACTIVE" )
type NotificationType ¶
type NotificationType string
const ( NotificationSnapshot NotificationType = "snapshot" NotificationUpdate NotificationType = "update" NotificationData NotificationType = "data" )
type OrderBookSpeedType ¶
type OrderBookSpeedType string
const ( OrderBookSpeed100ms OrderBookSpeedType = "100ms" OrderBookSpeed500ms OrderBookSpeedType = "500ms" OrderBookSpeed1000ms OrderBookSpeedType = "1000ms" )
type OrderByType ¶ added in v3.2.0
type OrderByType string
OrderBy is a field used for sorting lists
const ( OrderByID OrderByType = "id" OrderByCreatedAt OrderByType = "created_at" OrderByUpdateAt OrderByType = "updated_at" OrderByLastActivityAt OrderByType = "last_activity_at" )
type OrderRequest ¶
type OrderRequest struct { ClientOrderID string `json:"client_order_id,omitempty"` Symbol string `json:"symbol,omitempty"` Side SideType `json:"side,omitempty"` Type OrderType `json:"type,omitempty"` TimeInForce TimeInForceType `json:"time_in_force,omitempty"` Quantity string `json:"quantity,omitempty"` Price string `json:"price,omitempty"` StopPrice string `json:"stop_price,omitempty"` ExpireTime string `json:"expire_time,omitempty"` StrictValidate bool `json:"strict_validate,omitempty"` PostOnly bool `json:"post_only,omitempty"` MakeRate string `json:"make_rate,omitempty"` TakeRate string `json:"take_rate,omitempty"` }
type OrderStatusType ¶
type OrderStatusType string
const ( OrderStatusNew OrderStatusType = "new" OrderStatusSuspended OrderStatusType = "suspended" OrderStatusPartiallyFilled OrderStatusType = "partiallyFilled" OrderStatusFilled OrderStatusType = "filled" OrderStatusCanceled OrderStatusType = "canceled" OrderStatusExpired OrderStatusType = "expired" )
type PeriodType ¶
type PeriodType string
PeriodType is the period of a candle
const ( Period1Minute PeriodType = "M1" Period3Minutes PeriodType = "M3" Period5Minutes PeriodType = "M5" Period15Minutes PeriodType = "M15" Period30Minutes PeriodType = "M30" Period1Hour PeriodType = "H1" Period4Hours PeriodType = "H4" Period1Day PeriodType = "D1" Period7Days PeriodType = "D7" Period1Month PeriodType = "1M" )
type PriceRateSpeedType ¶
type PriceRateSpeedType string
const ( PriceRateSpeed1s PriceRateSpeedType = "1s" PriceRateSpeed3s PriceRateSpeedType = "3s" )
type ReportType ¶
type ReportType string
const ( ReportStatus ReportType = "status" ReportNew ReportType = "new" ReportCanceled ReportType = "canceled" ReportRejected ReportType = "rejected" ReportExpired ReportType = "expired" ReportSuspended ReportType = "suspended" ReportTrade ReportType = "trade" ReportReplaced ReportType = "replaced" )
type SortByType ¶
type SortByType string
SortBy is a field used for sorting lists
const ( SortByTimestamp SortByType = "timestamp" SortByID SortByType = "id" )
type SubscriptionModeType ¶
type SubscriptionModeType string
const ( SubscriptionModeUpdates SubscriptionModeType = "updates" SubscriptionModeBatches SubscriptionModeType = "batches" )
type SubscriptionType ¶
type SubscriptionType string
func SubscriptionTypeFullOrderbook ¶
func SubscriptionTypeFullOrderbook(speed OrderBookSpeedType) SubscriptionType
func SubscriptionTypeMiniTicker ¶
func SubscriptionTypeMiniTicker(speed OrderBookSpeedType) SubscriptionType
func SubscriptionTypeMiniTickerInBatch ¶
func SubscriptionTypeMiniTickerInBatch(speed OrderBookSpeedType) SubscriptionType
func SubscriptionTypeOrderbookTop ¶
func SubscriptionTypeOrderbookTop(speed OrderBookSpeedType) SubscriptionType
func SubscriptionTypeOrderbookTopInBatch ¶
func SubscriptionTypeOrderbookTopInBatch(speed OrderBookSpeedType) SubscriptionType
func SubscriptionTypePartialOrderbook ¶
func SubscriptionTypePartialOrderbook(depth WSDepthType, speed OrderBookSpeedType) SubscriptionType
func SubscriptionTypePartialOrderbookInBatch ¶
func SubscriptionTypePartialOrderbookInBatch(depth WSDepthType, speed OrderBookSpeedType) SubscriptionType
func SubscriptionTypeTicker ¶
func SubscriptionTypeTicker(speed OrderBookSpeedType) SubscriptionType
func SubscriptionTypeTickerInBatch ¶
func SubscriptionTypeTickerInBatch(speed OrderBookSpeedType) SubscriptionType
func SubscriptionTypeTrades ¶
func SubscriptionTypeTrades() SubscriptionType
func SubscriptionsTypeCandles ¶
func SubscriptionsTypeCandles(period PeriodType) SubscriptionType
type SymbolStatusType ¶
type SymbolStatusType string
const ( SymbolStatusWorking SymbolStatusType = "working" SymbolStatusSuspended SymbolStatusType = "suspended" )
type TickerSpeedType ¶
type TickerSpeedType string
const ( TickerSpeed1s TickerSpeedType = "1s" TickerSpeed3s TickerSpeedType = "3s" )
type TimeInForceType ¶
type TimeInForceType string
TimeInForceType is the time in force of an order
const ( TimeInForceGTC TimeInForceType = "GTC" // Good Till Cancel TimeInForceIOC TimeInForceType = "IOC" // Immediate or Cancel TimeInForceFOK TimeInForceType = "FOK" // Fill or Kill TimeInForceDAY TimeInForceType = "Day" // valid during Day TimeInForceGTD TimeInForceType = "GTD" // Good Till Date )
type TransactionStatusType ¶
type TransactionStatusType string
const ( TransactionStatusCreated TransactionStatusType = "CREATED" TransactionStatusPending TransactionStatusType = "PENDING" TransactionStatusFailed TransactionStatusType = "FAILED" TransactionStatusSuccess TransactionStatusType = "SUCCESS" TransactionStatusRolledBack TransactionStatusType = "ROLLED_BACK" )
type TransactionSubTypeType ¶
type TransactionSubTypeType string
const ( TransactionSubTypeUnclassified TransactionSubTypeType = "UNCLASSIFIED" TransactionSubTypeBlockchain TransactionSubTypeType = "BLOCKCHAIN" TransactionSubTypeAffiliate TransactionSubTypeType = "AFFILIATE" TransactionSubTypeOffchain TransactionSubTypeType = "OFFCHAIN" TransactionSubTypeFiat TransactionSubTypeType = "FIAT" TransactionSubTypeSubAccount TransactionSubTypeType = "SUB_ACCOUNT" TransactionSubTypeWalletToSpot TransactionSubTypeType = "WALLET_TO_SPOT" TransactionSubTypeSpotToWallet TransactionSubTypeType = "SPOT_TO_WALLET" TransactionSubTypeChainSwitchFrom TransactionSubTypeType = "CHAIN_SWITCH_FROM" TransactionSubTypeChainSwitchTo TransactionSubTypeType = "CHAIN_SWITCH_TO" TransactionSubTypeAirdrop TransactionSubTypeType = "AIRDROP" )
type TransactionTypeType ¶
type TransactionTypeType string
const ( TransactionTypeDeposit TransactionTypeType = "DEPOSIT" TransactionTypeWithdraw TransactionTypeType = "WITHDRAW" TransactionTypeTransfer TransactionTypeType = "TRANSFER" TransactionTypeSwap TransactionTypeType = "SWAP" )
type TransferTypeType ¶
type TransferTypeType string
const ( TransferToSubAccount TransferTypeType = "to_sub_account" TransferFromSubAccount TransferTypeType = "from_sub_account" )
type UseOffchainType ¶
type UseOffchainType string
const ( UseOffchainNever UseOffchainType = "never" UseOffchainOptionaly UseOffchainType = "optionaly" UseOffChainRequired UseOffchainType = "required" )
type WSDepthType ¶
type WSDepthType string
const ( WSDepth5 WSDepthType = "D5" WSDepth10 WSDepthType = "D10" WSDepth20 WSDepthType = "D20" )