Documentation ¶
Index ¶
- Constants
- type AccountBalances
- type CancelOrder
- type Order
- type OrderBook
- type OrderStatus
- type PairsData
- type PairsDetail
- type PlaceOrder
- type Tradeogre
- func (e *Tradeogre) ApiKeyRequest(strMethod, strRequestPath string, mapParams map[string]string) string
- func (e *Tradeogre) CanDeposit(coin *coin.Coin) bool
- func (e *Tradeogre) CanWithdraw(coin *coin.Coin) bool
- func (e *Tradeogre) CancelAllOrder() error
- func (e *Tradeogre) CancelOrder(order *exchange.Order) error
- func (e *Tradeogre) CancelOrderID(operation *exchange.AccountOperation) error
- func (e *Tradeogre) DeleteCoin(coin *coin.Coin)
- func (e *Tradeogre) DeletePair(pair *pair.Pair)
- func (e *Tradeogre) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Tradeogre) GetBalance(coin *coin.Coin) float64
- func (e *Tradeogre) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Tradeogre) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Tradeogre) GetCoins() []*coin.Coin
- func (e *Tradeogre) GetCoinsData() error
- func (e *Tradeogre) GetConfirmation(coin *coin.Coin) int
- func (e *Tradeogre) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Tradeogre) GetFee(pair *pair.Pair) float64
- func (e *Tradeogre) GetID() int
- func (e *Tradeogre) GetLotSize(pair *pair.Pair) float64
- func (e *Tradeogre) GetName() exchange.ExchangeName
- func (e *Tradeogre) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Tradeogre) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Tradeogre) GetPairs() []*pair.Pair
- func (e *Tradeogre) GetPairsData() error
- func (e *Tradeogre) GetPriceFilter(pair *pair.Pair) float64
- func (e *Tradeogre) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Tradeogre) GetSymbolByPair(pair *pair.Pair) string
- func (e *Tradeogre) GetTradingWebURL(pair *pair.Pair) string
- func (e *Tradeogre) GetTxFee(coin *coin.Coin) float64
- func (e *Tradeogre) HasPair(pair *pair.Pair) bool
- func (e *Tradeogre) InitData() error
- func (e *Tradeogre) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Tradeogre) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Tradeogre) ListOrders() ([]*exchange.Order, error)
- func (e *Tradeogre) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Tradeogre) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Tradeogre) OrderStatus(order *exchange.Order) error
- func (e *Tradeogre) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Tradeogre) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Tradeogre) UpdateAllBalances()
- func (e *Tradeogre) UpdateConstraint()
- func (e *Tradeogre) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
Constants ¶
const ( DEFAULT_ID = 31 DEFAULT_TAKER_FEE = 0.002 DEFAULT_MAKER_FEE = 0.002 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://tradeogre.com/api/v1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalances ¶
type CancelOrder ¶
type CancelOrder struct {
Success bool `json:"success"`
}
type OrderStatus ¶
type PairsData ¶
type PairsData []map[string]*PairsDetail
type PairsDetail ¶
type PlaceOrder ¶
type Tradeogre ¶
type Tradeogre 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 CreateTradeogre ¶
*************************************************
func (*Tradeogre) ApiKeyRequest ¶
func (e *Tradeogre) ApiKeyRequest(strMethod, strRequestPath string, mapParams map[string]string) string
************** 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 (*Tradeogre) CancelAllOrder ¶
func (*Tradeogre) CancelOrderID ¶
func (e *Tradeogre) CancelOrderID(operation *exchange.AccountOperation) error
func (*Tradeogre) DeleteCoin ¶
func (*Tradeogre) DeletePair ¶
func (*Tradeogre) DoAccountOperation ¶
func (e *Tradeogre) DoAccountOperation(operation *exchange.AccountOperation) error
func (e *Tradeogre) LoadPublicData(operation *exchange.PublicOperation) error { return fmt.Errorf("LoadPublicData :: Operation type invalid: %+v", operation.Type) }
************** Private API **************
func (*Tradeogre) GetCoinConstraint ¶
func (e *Tradeogre) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Tradeogre) 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 (*Tradeogre) GetConstraintFetchMethod ¶
func (e *Tradeogre) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Tradeogre) GetName ¶
func (e *Tradeogre) GetName() exchange.ExchangeName
func (*Tradeogre) GetPairConstraint ¶
func (e *Tradeogre) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Tradeogre) 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 (*Tradeogre) LoadPublicData ¶
func (e *Tradeogre) LoadPublicData(operation *exchange.PublicOperation) error
func (*Tradeogre) SetCoinConstraint ¶
func (e *Tradeogre) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Tradeogre) SetPairConstraint ¶
func (e *Tradeogre) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Tradeogre) UpdateAllBalances ¶
func (e *Tradeogre) UpdateAllBalances()
func (*Tradeogre) UpdateConstraint ¶
func (e *Tradeogre) UpdateConstraint()