Documentation ¶
Index ¶
- Constants
- type AccountBalances
- type CancelOrder
- type JsonResponse
- type OrderBook
- type OrderStatus
- type PairsData
- type PlaceOrder
- type RawKline
- type SingleOrder
- type Virgocx
- func (e *Virgocx) ApiKeyGET(strRequestPath string, mapParams map[string]string) string
- func (e *Virgocx) ApiKeyRequest(strMethod string, strRequestPath string, mapParams map[string]string) string
- func (e *Virgocx) CanDeposit(coin *coin.Coin) bool
- func (e *Virgocx) CanWithdraw(coin *coin.Coin) bool
- func (e *Virgocx) CancelAllOrder() error
- func (e *Virgocx) CancelOrder(order *exchange.Order) error
- func (e *Virgocx) DeleteCoin(coin *coin.Coin)
- func (e *Virgocx) DeletePair(pair *pair.Pair)
- func (e *Virgocx) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Virgocx) GetBalance(coin *coin.Coin) float64
- func (e *Virgocx) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Virgocx) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Virgocx) GetCoins() []*coin.Coin
- func (e *Virgocx) GetCoinsData() error
- func (e *Virgocx) GetConfirmation(coin *coin.Coin) int
- func (e *Virgocx) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Virgocx) GetFee(pair *pair.Pair) float64
- func (e *Virgocx) GetID() int
- func (e *Virgocx) GetLotSize(pair *pair.Pair) float64
- func (e *Virgocx) GetName() exchange.ExchangeName
- func (e *Virgocx) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Virgocx) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Virgocx) GetPairs() []*pair.Pair
- func (e *Virgocx) GetPairsData() error
- func (e *Virgocx) GetPriceFilter(pair *pair.Pair) float64
- func (e *Virgocx) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Virgocx) GetSymbolByPair(pair *pair.Pair) string
- func (e *Virgocx) GetTradingWebURL(pair *pair.Pair) string
- func (e *Virgocx) GetTxFee(coin *coin.Coin) float64
- func (e *Virgocx) HasPair(pair *pair.Pair) bool
- func (e *Virgocx) InitData() error
- func (e *Virgocx) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Virgocx) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Virgocx) ListOrders() ([]*exchange.Order, error)
- func (e *Virgocx) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Virgocx) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Virgocx) OrderStatus(order *exchange.Order) error
- func (e *Virgocx) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Virgocx) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Virgocx) UpdateAllBalances()
- func (e *Virgocx) UpdateConstraint()
- func (e *Virgocx) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
Constants ¶
const ( DEFAULT_ID = 50 DEFAULT_TAKER_FEE = 0.002 DEFAULT_MAKER_FEE = 0.001 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.virgocx.ca/api"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalances ¶
type CancelOrder ¶
type JsonResponse ¶
type JsonResponse struct { Code int `json:"code"` Msg string `json:"msg"` Data json.RawMessage `json:"data"` Success bool `json:"success"` }
type OrderStatus ¶
type OrderStatus []SingleOrder
type PlaceOrder ¶
type PlaceOrder struct {
OrderID string `json:"OrderId"`
}
type SingleOrder ¶
type Virgocx ¶
type Virgocx 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 CreateVirgocx ¶
*************************************************
func (*Virgocx) 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 (*Virgocx) ApiKeyRequest ¶
func (*Virgocx) CancelAllOrder ¶
func (*Virgocx) DeleteCoin ¶
func (*Virgocx) DeletePair ¶
func (*Virgocx) DoAccountOperation ¶
func (e *Virgocx) DoAccountOperation(operation *exchange.AccountOperation) error
func (*Virgocx) GetCoinConstraint ¶
func (e *Virgocx) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Virgocx) 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 (*Virgocx) GetConstraintFetchMethod ¶
func (e *Virgocx) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Virgocx) GetName ¶
func (e *Virgocx) GetName() exchange.ExchangeName
func (*Virgocx) GetPairConstraint ¶
func (e *Virgocx) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Virgocx) 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 (*Virgocx) GetTradingWebURL ¶
use pair ID in url; but api does not provide pair ID
func (*Virgocx) LoadPublicData ¶
func (e *Virgocx) LoadPublicData(operation *exchange.PublicOperation) error
func (*Virgocx) 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 (*Virgocx) OrderStatus ¶
need test Status code
func (*Virgocx) SetCoinConstraint ¶
func (e *Virgocx) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Virgocx) SetPairConstraint ¶
func (e *Virgocx) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Virgocx) UpdateAllBalances ¶
func (e *Virgocx) UpdateAllBalances()
func (*Virgocx) UpdateConstraint ¶
func (e *Virgocx) UpdateConstraint()