Documentation
¶
Index ¶
- Variables
- type Account
- type Address
- type Asset
- type Client
- func (c *Client) CancelTradeByID(market, tradeID string) error
- func (c *Client) CreateTrade(market string, direction types.TradeDirection, quantity float64) (string, error)
- func (c *Client) CreateWithdrawal(chain, address string, quantity float64) (string, error)
- func (c *Client) GenerateTradePath(fromChain, toChain string) ([]*types.Trade, error)
- func (c *Client) GetAccountStatus() error
- func (c *Client) GetDepositAddress(chain string) (string, error)
- func (c *Client) GetDepositByID(chain, depositID string) (*types.Deposit, error)
- func (c *Client) GetDepositByTxID(chain, txid string) (*types.Deposit, error)
- func (c *Client) GetHistoricalRates(market string, startTime, endTime time.Time, invert bool) (map[time.Time]float64, error)
- func (c *Client) GetOutputThresholds() map[string]*big.Int
- func (c *Client) GetPrices(inputPaths map[string]map[string]*big.Int) (map[string]map[string]float64, error)
- func (c *Client) GetRate(market string) (float64, error)
- func (c *Client) GetTradeByID(market, tradeID string, inputValue float64) (*types.Trade, error)
- func (c *Client) GetTradeTimeout() time.Duration
- func (c *Client) GetWalletBalance(chain string) (float64, float64, error)
- func (c *Client) GetWalletStatus(chain string) (bool, bool, error)
- func (c *Client) GetWithdrawalByID(chain, withdrawalID string) (*types.Withdrawal, error)
- func (c *Client) ID() types.ExchangeID
- func (c *Client) NeedsWithdrawalFeeSubtraction() bool
- func (c *Client) TransferToMainAccount(chain string, value float64) error
- func (c *Client) TransferToTradeAccount(chain string, value float64) error
- type Deposit
- type ExchangeInformation
- type Order
- type Rate
- type Symbol
- type TradeFee
- type Withdrawal
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEmptyTarget = fmt.Errorf("nil target after marshalling")
)
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { MakerCommission int `json:"makerCommission"` TakerCommission int `json:"takerCommission"` BuyerCommission int `json:"buyerCommission"` SellerCommission int `json:"sellerCommission"` CanDeposit bool `json:"canDeposit"` CanTrade bool `json:"canTrade"` CanWithdraw bool `json:"canWithdraw"` UpdateTime *int `json:"updateTime"` AccountType string `json:"accountType"` Balances []struct { Asset string `json:"asset"` Free string `json:"free"` Locked string `json:"locked"` } `json:"balances"` Permissions []string `json:"permissions"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CancelTradeByID ¶
func (*Client) CreateTrade ¶
func (*Client) CreateWithdrawal ¶
func (*Client) GenerateTradePath ¶
func (*Client) GetAccountStatus ¶
func (*Client) GetDepositByID ¶
func (*Client) GetDepositByTxID ¶
func (*Client) GetHistoricalRates ¶
func (*Client) GetTradeByID ¶
func (*Client) GetTradeTimeout ¶
func (*Client) GetWalletBalance ¶
func (*Client) GetWithdrawalByID ¶
func (c *Client) GetWithdrawalByID(chain, withdrawalID string) (*types.Withdrawal, error)
func (*Client) ID ¶
func (c *Client) ID() types.ExchangeID
func (*Client) NeedsWithdrawalFeeSubtraction ¶
func (*Client) TransferToMainAccount ¶
type Deposit ¶
type Deposit struct { Amount string `json:"amount"` Coin string `json:"coin"` Network string `json:"network"` Status int `json:"status"` Address string `json"address"` AddressTag string `json:"addressTag"` TxID string `json:"txId"` InsertTime string `json:"insertTime"` TransferType int `json:"transferType"` UnlockConfirm string `json:"unlockConfirm"` ConfirmTimes string `json:"confirmTimes"` }
type ExchangeInformation ¶
type Order ¶
type Order struct { Symbol string `json:"symbol"` OrderID int64 `json"orderId"` OrderListID int64 `json"orderListId"` ClientOrderID string `json:"clientOrderId"` Price string `json:"price"` OrigQty string `json:"origQty"` ExecutedQty string `json:"executedQty"` CumulativeQuoteQty string `json:"cummulativeQuoteQty"` Status string `json:"status"` TimeInForce string `json:"timeInForce"` Type string `json:"type"` Side string `json:"side"` StopPrice string `json:"stopPrice"` IcebergQty string `json:"icebergQty"` Time int `json:"time"` UpdateTime int `json:"updateTime"` IsWorking bool `json:"isWorking"` OrigQuoteOrderQty string `json:"origQuoteOrderQty"` }
type Symbol ¶
type Symbol struct { Symbol string `json:"symbol"` Status string `json:"status"` BaseAsset string `json:"baseAsset"` BaseAssetPrecision int `json:"baseAssetPrecision"` QuoteAsset string `json:"quoteAsset"` QuotePrecision string `json:"quotePrecision"` QuoteAssetPrecision string `json:"quoteAssetPrecision"` QuoteCommissionPrecision string `json:"quoteCommissionPrecision"` OrderTypes []string `json:"orderTypes"` IcebergAllowed bool `json:"icebergAllowed"` OcoAllowed bool `json:"ocoAllowed"` QuoteOrderQtyMarketAllowed bool `json:"quoteOrderQtyMarketAllowed"` AllowTrailingStop bool `json:"allowTrailingStop"` CancelReplaceAllowed bool `json:"cancelReplaceAllowed"` IsSpotTradingAllowed bool `json:"isSpotTradingAllowed"` IsMarginTradingAllowed bool `json:"isMarginTradingAllowed"` }
type Withdrawal ¶
type Withdrawal struct { Address string `json:"address"` Amount string `json:"amount"` ApplyTime string `json:"applyTime"` Coin string `json:"coin"` ID string `json"id"` WithdrawOrderID string `json:"withdrawOrderId"` Network string `json:"network"` TransferType int `json:"transferType"` Status int `json:"status"` TransactionFee string `json:"transactionFee"` ConfirmNo int `json:"confirmNo"` Info string `json:"info"` TxID string `json:"txId"` }
Click to show internal directories.
Click to hide internal directories.