Documentation ¶
Index ¶
- Constants
- type AccountBalances
- type Bittrex
- func (e *Bittrex) ApiKeyGET(strRequestPath string, mapParams map[string]string) string
- func (e *Bittrex) CanDeposit(coin *coin.Coin) bool
- func (e *Bittrex) CanWithdraw(coin *coin.Coin) bool
- func (e *Bittrex) CancelAllOrder() error
- func (e *Bittrex) CancelOrder(order *exchange.Order) error
- func (e *Bittrex) DeleteCoin(coin *coin.Coin)
- func (e *Bittrex) DeletePair(pair *pair.Pair)
- func (e *Bittrex) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Bittrex) GetBalance(coin *coin.Coin) float64
- func (e *Bittrex) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Bittrex) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Bittrex) GetCoins() []*coin.Coin
- func (e *Bittrex) GetCoinsData() error
- func (e *Bittrex) GetConfirmation(coin *coin.Coin) int
- func (e *Bittrex) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Bittrex) GetFee(pair *pair.Pair) float64
- func (e *Bittrex) GetID() int
- func (e *Bittrex) GetLotSize(pair *pair.Pair) float64
- func (e *Bittrex) GetName() exchange.ExchangeName
- func (e *Bittrex) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Bittrex) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Bittrex) GetPairs() []*pair.Pair
- func (e *Bittrex) GetPairsData() error
- func (e *Bittrex) GetPriceFilter(pair *pair.Pair) float64
- func (e *Bittrex) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Bittrex) GetSymbolByPair(pair *pair.Pair) string
- func (e *Bittrex) GetTradingWebURL(pair *pair.Pair) string
- func (e *Bittrex) GetTxFee(coin *coin.Coin) float64
- func (e *Bittrex) HasPair(pair *pair.Pair) bool
- func (e *Bittrex) InitData() error
- func (e *Bittrex) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bittrex) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bittrex) ListOrders() ([]*exchange.Order, error)
- func (e *Bittrex) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Bittrex) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Bittrex) OrderStatus(order *exchange.Order) error
- func (e *Bittrex) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Bittrex) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Bittrex) UpdateAllBalances()
- func (e *Bittrex) UpdateConstraint()
- func (e *Bittrex) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type CoinsData
- type JsonResponse
- type OrderBook
- type PairsData
- type PlaceOrder
- type TradeHistory
- type Uuid
Constants ¶
const ( DEFAULT_ID = 2 DEFAULT_TAKER_FEE = 0.0025 DEFAULT_MAKER_FEE = 0.0025 DEFAULT_LOT_SIZE = 0.00000001 DEFAULT_PRICE_FILTER = 0.00000001 DEFAULT_DEPOSIT = true )
const (
API_URL string = "https://bittrex.com/api"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalances ¶
type Bittrex ¶
type Bittrex struct { ID int Name string `bson:"name"` Website string `bson:"website"` API_KEY string API_SECRET string Source exchange.DataSource // / exchange API / microservicve api 1 / PSQL SourceURI string }
func CreateBittrex ¶
*************************************************
func (*Bittrex) ApiKeyGET ¶
************** Signature Http Request ************** Method: API Request and Signature is required Step 1: Change Instance Name (e *<exchange Instance Name>) Step 2: Create mapParams Depend on API Signature request Step 3: Add HttpGetRequest below strUrl if API has different requests
func (*Bittrex) CancelAllOrder ¶
func (*Bittrex) DeleteCoin ¶
func (*Bittrex) DeletePair ¶
func (*Bittrex) DoAccountOperation ¶
func (e *Bittrex) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Bittrex) GetCoinConstraint ¶
func (e *Bittrex) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Bittrex) GetCoinsData ¶
************** Public API ************** Get Coins Information (If API provide) Step 1: Change Instance Name (e *<exchange Instance Name>) Step 2: Add Model of API Response Step 3: Modify API Path(strRequestUrl)
func (*Bittrex) GetConstraintFetchMethod ¶
func (e *Bittrex) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Bittrex) GetName ¶
func (e *Bittrex) GetName() exchange.ExchangeName
func (*Bittrex) GetPairConstraint ¶
func (e *Bittrex) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Bittrex) GetPairsData ¶
GetPairsData - Get Pairs Information (If API provide)
Step 1: Change Instance Name (e *<exchange Instance Name>) Step 2: Add Model of API Response Step 3: Modify API Path(strRequestUrl)
func (*Bittrex) LoadPublicData ¶
func (e *Bittrex) LoadPublicData(operation *exchange.PublicOperation) error
func (*Bittrex) OrderBook ¶
Get Pair Market Depth Step 1: Change Instance Name (e *<exchange Instance Name>) Step 2: Add Model of API Response Step 3: Get Exchange Pair Code ex. symbol := e.GetPairCode(p) Step 4: Modify API Path(strRequestUrl) Step 5: Add Params - Depend on API request Step 6: Convert the response to Standard Maker struct
func (*Bittrex) SetCoinConstraint ¶
func (e *Bittrex) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Bittrex) SetPairConstraint ¶
func (e *Bittrex) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Bittrex) UpdateAllBalances ¶
func (e *Bittrex) UpdateAllBalances()
func (*Bittrex) UpdateConstraint ¶
func (e *Bittrex) UpdateConstraint()
type CoinsData ¶
type CoinsData []struct { Currency string `json:"Currency"` CurrencyLong string `json:"CurrencyLong"` MinConfirmation int `json:"MinConfirmation"` TxFee float64 `json:"TxFee"` IsActive bool `json:"IsActive"` IsRestricted bool `json:"IsRestricted"` CoinType string `json:"CoinType"` BaseAddress string `json:"BaseAddress"` Notice interface{} `json:"Notice"` }
type JsonResponse ¶
type JsonResponse struct { Success bool `json:"success"` Message string `json:"message"` Result json.RawMessage `json:"result"` }
type PairsData ¶
type PairsData []struct { MarketCurrency string `json:"MarketCurrency"` BaseCurrency string `json:"BaseCurrency"` MarketCurrencyLong string `json:"MarketCurrencyLong"` BaseCurrencyLong string `json:"BaseCurrencyLong"` MinTradeSize float64 `json:"MinTradeSize"` MarketName string `json:"MarketName"` IsActive bool `json:"IsActive"` Created string `json:"Created"` Notice interface{} `json:"Notice"` IsSponsored interface{} `json:"IsSponsored"` LogoURL string `json:"LogoUrl"` }
type PlaceOrder ¶
type PlaceOrder struct { AccountId string OrderUuid string `json:"OrderUuid"` Exchange string `json:"Exchange"` Type string Quantity float64 `json:"Quantity"` QuantityRemaining float64 `json:"QuantityRemaining"` Limit float64 `json:"Limit"` Reserved float64 ReserveRemaining float64 CommissionReserved float64 CommissionReserveRemaining float64 CommissionPaid float64 Price float64 `json:"Price"` PricePerUnit float64 `json:"PricePerUnit"` Opened string Closed string IsOpen bool Sentinel string CancelInitiated bool ImmediateOrCancel bool IsConditional bool Condition string ConditionTarget float64 }