bittrex

package
v0.0.0-...-5ed304f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyTarget = fmt.Errorf("nil target after marshalling")
)

Functions

This section is empty.

Types

type Address

type Address struct {
	Status           string `json:"status"`
	CurrencySymbol   string `json:"currencySymbol"`
	CryptoAddress    string `json:"cryptoAddress"`
	CryptoAddressTag string `json:"cryptoAddressTag"`
}

type Balance

type Balance struct {
	Currency  string    `json:"currencySymbol"`
	Total     string    `json:"total"`
	Available string    `json:"available"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(apiKey, secretKey string) *Client

func (*Client) CancelTradeByID

func (c *Client) CancelTradeByID(market, tradeID string) error

func (*Client) CreateTrade

func (c *Client) CreateTrade(
	market string,
	direction types.TradeDirection,
	quantity float64,
) (string, error)

func (*Client) CreateWithdrawal

func (c *Client) CreateWithdrawal(chain, address string, quantity float64) (string, error)

func (*Client) GenerateTradePath

func (c *Client) GenerateTradePath(fromChain, toChain string) ([]*types.Trade, error)

func (*Client) GetAccountStatus

func (c *Client) GetAccountStatus() error

func (*Client) GetDepositAddress

func (c *Client) GetDepositAddress(chain string) (string, error)

func (*Client) GetDepositByID

func (c *Client) GetDepositByID(chain, depositID string) (*types.Deposit, error)

func (*Client) GetDepositByTxID

func (c *Client) GetDepositByTxID(chain, txid string) (*types.Deposit, error)

func (*Client) GetHistoricalRates

func (c *Client) GetHistoricalRates(
	market string,
	startTime, endTime time.Time,
	invert bool,
) (map[time.Time]float64, error)

func (*Client) GetOutputThresholds

func (c *Client) GetOutputThresholds() map[string]*big.Int

func (*Client) GetPrices

func (c *Client) GetPrices(inputPaths map[string]map[string]*big.Int) (map[string]map[string]float64, error)

func (*Client) GetRate

func (c *Client) GetRate(market string) (float64, error)

func (*Client) GetTradeByID

func (c *Client) GetTradeByID(market, tradeID string, inputValue float64) (*types.Trade, error)

func (*Client) GetTradeTimeout

func (c *Client) GetTradeTimeout() time.Duration

func (*Client) GetWalletBalance

func (c *Client) GetWalletBalance(chain string) (float64, float64, error)

func (*Client) GetWalletStatus

func (c *Client) GetWalletStatus(chain string) (bool, bool, error)

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 (c *Client) NeedsWithdrawalFeeSubtraction() bool

func (*Client) TransferToMainAccount

func (c *Client) TransferToMainAccount(chain string, value float64) error

func (*Client) TransferToTradeAccount

func (c *Client) TransferToTradeAccount(chain string, value float64) error

type Currency

type Currency struct {
	Symbol                   string        `json:"symbol"`
	Name                     string        `json:"name"`
	CoinType                 string        `json:"coinType"`
	Status                   string        `json:"status"`
	MinConfirmations         int           `json:"minConfirmations"`
	Notice                   string        `json:"notice"`
	TxFee                    string        `json:"txFee"`
	LogoURL                  string        `json:"logoUrl,omitempty"`
	ProhibitedIn             []interface{} `json:"prohibitedIn"`
	BaseAddress              string        `json:"baseAddress,omitempty"`
	AssociatedTermsOfService []interface{} `json:"associatedTermsOfService"`
}

type Deposit

type Deposit struct {
	ID               string `json:"id"`
	CurrencySymbol   string `json:"currencySymbol"`
	Quantity         string `json:"quantity"`
	CryptoAddress    string `json:"cryptoAddress"`
	CryptoAddressTag string `json:"cryptoAddressTag"`
	TxID             string `json:"txId"`
	Confirmations    int32  `json:"confirmations"`
	UpdatedAt        string `json:"updatedAt"`
	CompletedAt      string `json:"completedAt"`
	Status           string `json:"status"`
	Source           string `json:"source"`
}

type HistoricalRateResponse

type HistoricalRateResponse struct {
	StartsAt time.Time `json:"startsAt"`
	Open     string    `json:"open"`
	High     string    `json:"high"`
	Low      string    `json:"low"`
	Close    string    `json:"close"`
}

type Order

type Order struct {
	ID            string      `json:"id"`
	MarketSymbol  string      `json:"marketSymbol"`
	Direction     string      `json:"direction"`
	Type          string      `json:"type"`
	Quantity      string      `json:"quantity"`
	Limit         string      `json:"limit"`
	Ceiling       string      `json:"ceiling"`
	TimeInForce   string      `json:"timeInForce"`
	ClientOrderID string      `json:"clientOrderId"`
	FillQuantity  string      `json:"fillQuantity"`
	Commission    string      `json:"commission"`
	Proceeds      string      `json:"proceeds"`
	Status        string      `json:"status"`
	CreatedAt     time.Time   `json:"createdAt"`
	UpdatedAt     time.Time   `json:"updatedAt"`
	ClosedAt      time.Time   `json:"closedAt"`
	OrderToCancel interface{} `json:"orderToCancel"`
}

type RateResponse

type RateResponse struct {
	Symbol        string `json:"symbol"`
	LastTradeRate string `json:"lastTradeRate"`
	BidRate       string `json:"bidRate"`
	AskRate       string `json:"askRate"`
}

type Withdrawal

type Withdrawal struct {
	ID               string    `json:"id"`
	CurrencySymbol   string    `json:"currencySymbol"`
	Quantity         string    `json:"quantity"`
	CryptoAddress    string    `json:"cryptoAddress"`
	CryptoAddressTag string    `json:"cryptoAddressTag"`
	TxCost           string    `json:"txCost"`
	TxID             string    `json:"txId"`
	Status           string    `json:"status"`
	CreatedAt        time.Time `json:"createdAt"`
	CompletedAt      time.Time `json:"completedAt"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL