Documentation ¶
Index ¶
- Constants
- type Bitstamp
- func (e *Bitstamp) ApiKeyGET(strRequestPath string, mapParams map[string]string) string
- func (e *Bitstamp) CanDeposit(coin *coin.Coin) bool
- func (e *Bitstamp) CanWithdraw(coin *coin.Coin) bool
- func (e *Bitstamp) CancelAllOrder() error
- func (e *Bitstamp) CancelOrder(order *exchange.Order) error
- func (e *Bitstamp) DeleteCoin(coin *coin.Coin)
- func (e *Bitstamp) DeletePair(pair *pair.Pair)
- func (e *Bitstamp) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Bitstamp) GetBalance(coin *coin.Coin) float64
- func (e *Bitstamp) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Bitstamp) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Bitstamp) GetCoins() []*coin.Coin
- func (e *Bitstamp) GetCoinsData() error
- func (e *Bitstamp) GetConfirmation(coin *coin.Coin) int
- func (e *Bitstamp) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Bitstamp) GetFee(pair *pair.Pair) float64
- func (e *Bitstamp) GetID() int
- func (e *Bitstamp) GetLotSize(pair *pair.Pair) float64
- func (e *Bitstamp) GetName() exchange.ExchangeName
- func (e *Bitstamp) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Bitstamp) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Bitstamp) GetPairs() []*pair.Pair
- func (e *Bitstamp) GetPairsData() error
- func (e *Bitstamp) GetPriceFilter(pair *pair.Pair) float64
- func (e *Bitstamp) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Bitstamp) GetSymbolByPair(pair *pair.Pair) string
- func (e *Bitstamp) GetTradingWebURL(pair *pair.Pair) string
- func (e *Bitstamp) GetTxFee(coin *coin.Coin) float64
- func (e *Bitstamp) HasPair(pair *pair.Pair) bool
- func (e *Bitstamp) InitData() error
- func (e *Bitstamp) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitstamp) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bitstamp) ListOrders() ([]*exchange.Order, error)
- func (e *Bitstamp) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Bitstamp) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Bitstamp) OrderStatus(order *exchange.Order) error
- func (e *Bitstamp) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Bitstamp) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Bitstamp) UpdateAllBalances()
- func (e *Bitstamp) UpdateConstraint()
- func (e *Bitstamp) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type CoinsData
- type OrderBook
- type PairsData
- type TradeHistory
Constants ¶
const ( DEFAULT_ID = 9 DEFAULT_TAKER_FEE = 0.0025 DEFAULT_MAKER_FEE = 0.0025 DEFAULT_LOT_SIZE = 0.00000001 DEFAULT_PRICE_FILTER = 0.00000001 DEFAULT_TXFEE = 0.005 DEFAULT_WITHDRAW = true DEFAULT_DEPOSIT = true DEFAULT_CONFIRMATION = 2 DEFAULT_LISTED = true )
const (
API_URL string = "https://www.bitstamp.net/api/v2"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitstamp ¶
type Bitstamp 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 CreateBitstamp ¶
*************************************************
func (*Bitstamp) 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 (*Bitstamp) CancelAllOrder ¶
func (*Bitstamp) DeleteCoin ¶
func (*Bitstamp) DeletePair ¶
func (*Bitstamp) DoAccountOperation ¶
func (e *Bitstamp) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Bitstamp) GetCoinConstraint ¶
func (e *Bitstamp) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Bitstamp) 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 (*Bitstamp) GetConstraintFetchMethod ¶
func (e *Bitstamp) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Bitstamp) GetName ¶
func (e *Bitstamp) GetName() exchange.ExchangeName
func (*Bitstamp) GetPairConstraint ¶
func (e *Bitstamp) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Bitstamp) 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 (*Bitstamp) LoadPublicData ¶
func (e *Bitstamp) LoadPublicData(operation *exchange.PublicOperation) error
func (*Bitstamp) 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 (*Bitstamp) SetCoinConstraint ¶
func (e *Bitstamp) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Bitstamp) SetPairConstraint ¶
func (e *Bitstamp) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Bitstamp) UpdateAllBalances ¶
func (e *Bitstamp) UpdateAllBalances()
func (*Bitstamp) UpdateConstraint ¶
func (e *Bitstamp) UpdateConstraint()