Documentation ¶
Index ¶
- Constants
- type AccountBalances
- type Bigone
- func (e *Bigone) ApiKeyRequest(strRequestPath string, mapParams map[string]string, method string) string
- func (e *Bigone) CanDeposit(coin *coin.Coin) bool
- func (e *Bigone) CanWithdraw(coin *coin.Coin) bool
- func (e *Bigone) CancelAllOrder() error
- func (e *Bigone) CancelOrder(order *exchange.Order) error
- func (e *Bigone) DeleteCoin(coin *coin.Coin)
- func (e *Bigone) DeletePair(pair *pair.Pair)
- func (e *Bigone) DoAccountOperation(operation *exchange.AccountOperation) error
- func (e *Bigone) GetBalance(coin *coin.Coin) float64
- func (e *Bigone) GetCoinBySymbol(symbol string) *coin.Coin
- func (e *Bigone) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
- func (e *Bigone) GetCoins() []*coin.Coin
- func (e *Bigone) GetCoinsData() error
- func (e *Bigone) GetConfirmation(coin *coin.Coin) int
- func (e *Bigone) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
- func (e *Bigone) GetFee(pair *pair.Pair) float64
- func (e *Bigone) GetID() int
- func (e *Bigone) GetLotSize(pair *pair.Pair) float64
- func (e *Bigone) GetName() exchange.ExchangeName
- func (e *Bigone) GetPairBySymbol(symbol string) *pair.Pair
- func (e *Bigone) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
- func (e *Bigone) GetPairs() []*pair.Pair
- func (e *Bigone) GetPairsData() error
- func (e *Bigone) GetPriceFilter(pair *pair.Pair) float64
- func (e *Bigone) GetSymbolByCoin(coin *coin.Coin) string
- func (e *Bigone) GetSymbolByPair(pair *pair.Pair) string
- func (e *Bigone) GetTradingWebURL(pair *pair.Pair) string
- func (e *Bigone) GetTxFee(coin *coin.Coin) float64
- func (e *Bigone) HasPair(pair *pair.Pair) bool
- func (e *Bigone) InitData() error
- func (e *Bigone) LimitBuy(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bigone) LimitSell(pair *pair.Pair, quantity, rate float64) (*exchange.Order, error)
- func (e *Bigone) ListOrders() ([]*exchange.Order, error)
- func (e *Bigone) LoadPublicData(operation *exchange.PublicOperation) error
- func (e *Bigone) OrderBook(pair *pair.Pair) (*exchange.Maker, error)
- func (e *Bigone) OrderStatus(order *exchange.Order) error
- func (e *Bigone) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
- func (e *Bigone) SetPairConstraint(pairConstraint *exchange.PairConstraint)
- func (e *Bigone) UpdateAllBalances()
- func (e *Bigone) UpdateConstraint()
- func (e *Bigone) Withdraw(coin *coin.Coin, quantity float64, addr, tag string) bool
- type JsonResponse
- type OrderBook
- type PairsData
- type PlaceOrder
- type Withdraw
Constants ¶
const ( DEFAULT_ID = 17 DEFAULT_TAKER_FEE = 0.001 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://big.one/api/v3"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalances ¶
type Bigone ¶
type Bigone 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 CreateBigone ¶
*************************************************
func (*Bigone) ApiKeyRequest ¶
func (e *Bigone) ApiKeyRequest(strRequestPath string, mapParams map[string]string, method 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 (*Bigone) CancelAllOrder ¶
func (*Bigone) DeleteCoin ¶
func (*Bigone) DeletePair ¶
func (*Bigone) DoAccountOperation ¶
func (e *Bigone) DoAccountOperation(operation *exchange.AccountOperation) error
************** Private API **************
func (*Bigone) GetCoinConstraint ¶
func (e *Bigone) GetCoinConstraint(coin *coin.Coin) *exchange.CoinConstraint
************** Coins on the Exchanges **************
func (*Bigone) 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 (*Bigone) GetConstraintFetchMethod ¶
func (e *Bigone) GetConstraintFetchMethod(pair *pair.Pair) *exchange.ConstrainFetchMethod
*************** Exchange Constraint ***************
func (*Bigone) GetName ¶
func (e *Bigone) GetName() exchange.ExchangeName
func (*Bigone) GetPairConstraint ¶
func (e *Bigone) GetPairConstraint(pair *pair.Pair) *exchange.PairConstraint
************** Pairs on the Exchanges **************
func (*Bigone) 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 (*Bigone) LoadPublicData ¶
func (e *Bigone) LoadPublicData(operation *exchange.PublicOperation) error
func (*Bigone) 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 (*Bigone) SetCoinConstraint ¶
func (e *Bigone) SetCoinConstraint(coinConstraint *exchange.CoinConstraint)
func (*Bigone) SetPairConstraint ¶
func (e *Bigone) SetPairConstraint(pairConstraint *exchange.PairConstraint)
func (*Bigone) UpdateAllBalances ¶
func (e *Bigone) UpdateAllBalances()
func (*Bigone) UpdateConstraint ¶
func (e *Bigone) UpdateConstraint()
type JsonResponse ¶
type JsonResponse struct { Code int `json:"code"` Message string `json:"message"` Data json.RawMessage `json:"data"` }
type OrderBook ¶
type OrderBook struct { AssetPairName string `json:"asset_pair_name"` Bids []struct { Price string `json:"price"` OrderCount int `json:"order_count"` Quantity string `json:"quantity"` } `json:"bids"` Asks []struct { Price string `json:"price"` OrderCount int `json:"order_count"` Quantity string `json:"quantity"` } `json:"asks"` }
type PairsData ¶
type PairsData []struct { ID string `json:"id"` Name string `json:"name"` QuoteScale int `json:"quote_scale"` QuoteAsset struct { ID string `json:"id"` Symbol string `json:"symbol"` Name string `json:"name"` } `json:"quote_asset"` BaseAsset struct { ID string `json:"id"` Symbol string `json:"symbol"` Name string `json:"name"` } `json:"base_asset"` BaseScale int `json:"base_scale"` MinQuoteValue string `json:"min_quote_value"` }
type PlaceOrder ¶
type PlaceOrder struct { ID int `json:"id"` AssetPairName string `json:"asset_pair_name"` Price string `json:"price"` Amount string `json:"amount"` FilledAmount string `json:"filled_amount"` AvgDealPrice string `json:"avg_deal_price"` Side string `json:"side"` State string `json:"state"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type Withdraw ¶
type Withdraw []struct { ID int `json:"id"` CustomerID int `json:"customer_id"` AssetUUID string `json:"asset_uuid"` Amount string `json:"amount"` Recipient interface{} `json:"recipient"` State string `json:"state"` IsInternal bool `json:"is_internal"` Note string `json:"note"` Kind string `json:"kind"` Txid string `json:"txid"` Confirms int `json:"confirms"` InsertedAt interface{} `json:"inserted_at"` UpdatedAt interface{} `json:"updated_at"` CompletedAt interface{} `json:"completed_at"` Commision interface{} `json:"commision"` Explain string `json:"explain"` }