Versions in this module Expand all Collapse all v1 v1.0.6 Sep 27, 2019 Changes in this version + const ASSETS + const CANCEL_ORDER + const EXCHANGE + const Endpoint + const FCoinWSKLines + const FCoinWSOrderBook + const FCoinWSOrderBookFull + const FCoinWSOrderBookL150 + const FCoinWSOrderBookL20 + const FCoinWSTicker + const FCoinWSTrades + const GET_ACCOUNTS + const GET_DEPTH + const GET_POSITION + const GET_TICKER + const GET_UNFINISHED_ORDERS + const PLACE_ORDER + const SPOT + type Asset struct + Avaliable float64 + Currency Currency + Finances float64 + Frozen float64 + Lock float64 + Total float64 + type FCoin struct + func NewFCoin(client *http.Client, apikey, secretkey string) *FCoin + func (fc *FCoin) AssetTransfer(currency Currency, amount, from, to string) (bool, error) + func (fc *FCoin) CancelOrder(orderId string, currency CurrencyPair) (bool, error) + func (fc *FCoin) GetAccount() (*Account, error) + func (fc *FCoin) GetAssets() ([]Asset, error) + func (fc *FCoin) GetDaysOrderHistorys(currency CurrencyPair, start time.Time, days int64) ([]Order, error) + func (fc *FCoin) GetDepth(size int, currency CurrencyPair) (*Depth, error) + func (fc *FCoin) GetExchangeName() string + func (fc *FCoin) GetHoursOrderHistorys(currency CurrencyPair, start time.Time, hours int64) ([]Order, error) + func (fc *FCoin) GetKlineRecords(currency CurrencyPair, period, size, since int) ([]Kline, error) + func (fc *FCoin) GetOneOrder(orderId string, currency CurrencyPair) (*Order, error) + func (fc *FCoin) GetOrderHistorys(currency CurrencyPair, currentPage, pageSize int) ([]Order, error) + func (fc *FCoin) GetOrderHistorys2(currency CurrencyPair, currentPage, pageSize int, states ...string) ([]Order, error) + func (fc *FCoin) GetServerTime() (int64, error) + func (fc *FCoin) GetTicker(currencyPair CurrencyPair) (*Ticker, error) + func (fc *FCoin) GetTradeSymbol(currencyPair CurrencyPair) (*TradeSymbol, error) + func (fc *FCoin) GetTradeSymbol2(currencyPair CurrencyPair) (*TradeSymbol2, error) + func (fc *FCoin) GetTradeSymbols() ([]TradeSymbol, error) + func (fc *FCoin) GetTradeSymbols2() ([]TradeSymbol2, error) + func (fc *FCoin) GetTrades(currencyPair CurrencyPair, since int64) ([]Trade, error) + func (fc *FCoin) GetUnfinishOrders(currency CurrencyPair) ([]Order, error) + func (fc *FCoin) LimitBuy(amount, price string, currency CurrencyPair) (*Order, error) + func (fc *FCoin) LimitSell(amount, price string, currency CurrencyPair) (*Order, error) + func (fc *FCoin) MarketBuy(amount, price string, currency CurrencyPair) (*Order, error) + func (fc *FCoin) MarketSell(amount, price string, currency CurrencyPair) (*Order, error) + func (fc *FCoin) PlaceOrder(orderType OrderType, orderSide, amount, price string, pair CurrencyPair, ...) (*Order, error) + type FCoinMargin struct + func NewFcoinMargin(client *http.Client, apikey, secretkey string) *FCoinMargin + func (fm *FCoinMargin) AssetTransferIn(currency Currency, amount, from string, to CurrencyPair) (bool, error) + func (fm *FCoinMargin) AssetTransferOut(currency Currency, amount string, from CurrencyPair, to string) (bool, error) + func (fm *FCoinMargin) Borrow(parameter BorrowParameter) (*MarginOrder, error) + func (fm *FCoinMargin) GetAccount() (*Account, error) + func (fm *FCoinMargin) GetExchangeName() string + func (fm *FCoinMargin) GetMarginAccount(currency CurrencyPair) (*MarginAccount, error) + func (fm *FCoinMargin) GetOneLoan(borrowId string) (*MarginOrder, error) + func (fm *FCoinMargin) GetOrderHistorys(currency CurrencyPair, currentPage, pageSize int) ([]Order, error) + func (fm *FCoinMargin) GetOrderHistorys2(currency CurrencyPair, currentPage, pageSize int, states ...string) ([]Order, error) + func (fm *FCoinMargin) GetUnfinishLoans(currency CurrencyPair) ([]*MarginOrder, error) + func (fm *FCoinMargin) GetUnfinishOrders(currency CurrencyPair) ([]Order, error) + func (fm *FCoinMargin) LimitBuy(amount, price string, currency CurrencyPair) (*Order, error) + func (fm *FCoinMargin) LimitSell(amount, price string, currency CurrencyPair) (*Order, error) + func (fm *FCoinMargin) MarketBuy(amount, price string, currency CurrencyPair) (*Order, error) + func (fm *FCoinMargin) MarketSell(amount, price string, currency CurrencyPair) (*Order, error) + func (fm *FCoinMargin) Repayment(parameter RepaymentParameter) (repaymentId string, err error) + type FCoinWs struct + func NewFCoinWs(client *http.Client) *FCoinWs + func (fcWs *FCoinWs) SetCallbacks(tickerCallback func(*Ticker), depthCallback func(*Depth), ...) + func (fcWs *FCoinWs) SubscribeDepth(pair CurrencyPair, size int) error + func (fcWs *FCoinWs) SubscribeKline(pair CurrencyPair, period int) error + func (fcWs *FCoinWs) SubscribeTicker(pair CurrencyPair) error + func (fcWs *FCoinWs) SubscribeTrade(pair CurrencyPair) error + type FMexSwap struct + func NewFMexSwap(config *APIConfig) *FMexSwap + func (fm *FMexSwap) AdaptTradeStatus(status int) TradeStatus + func (fm *FMexSwap) FutureCancelOrder(currencyPair CurrencyPair, contractType, orderId string) (bool, error) + func (fm *FMexSwap) GetContractValue(currencyPair CurrencyPair) (float64, error) + func (fm *FMexSwap) GetDeliveryTime() (int, int, int, int) + func (fm *FMexSwap) GetExchangeName() string + func (fm *FMexSwap) GetExchangeRate() (float64, error) + func (fm *FMexSwap) GetFee() (float64, error) + func (fm *FMexSwap) GetFutureDepth(currencyPair CurrencyPair, contractType string, size int) (*Depth, error) + func (fm *FMexSwap) GetFutureEstimatedPrice(currencyPair CurrencyPair) (float64, error) + func (fm *FMexSwap) GetFutureIndex(currencyPair CurrencyPair) (float64, error) + func (fm *FMexSwap) GetFutureOrder(orderId string, currencyPair CurrencyPair, contractType string) (*FutureOrder, error) + func (fm *FMexSwap) GetFutureOrders(orderIds []string, currencyPair CurrencyPair, contractType string) ([]FutureOrder, error) + func (fm *FMexSwap) GetFuturePosition(currencyPair CurrencyPair, contractType string) ([]FuturePosition, error) + func (fm *FMexSwap) GetFutureTicker(currencyPair CurrencyPair, contractType string) (*Ticker, error) + func (fm *FMexSwap) GetFutureUserinfo() (*FutureAccount, error) + func (fm *FMexSwap) GetHistoricalFunding(contractType string, currencyPair CurrencyPair, page int) ([]HistoricalFunding, error) + func (fm *FMexSwap) GetKlineRecords(contract_type string, currency CurrencyPair, period, size, since int) ([]FutureKline, error) + func (fm *FMexSwap) GetTrades(contract_type string, currencyPair CurrencyPair, since int64) ([]Trade, error) + func (fm *FMexSwap) GetUnfinishFutureOrders(currencyPair CurrencyPair, contractType string) ([]FutureOrder, error) + func (fm *FMexSwap) PlaceFutureOrder(currencyPair CurrencyPair, contractType, price, amount string, ...) (string, error) + type MarginOrder struct + Amount float64 + BorrowTime int64 + Currency Currency + LastRepayTime int64 + LendingFee float64 + LoanBillId string + LoanFeeStartTime int64 + LoanRate float64 + NextLoanFeeStartTime int64 + RepaymentTime int64 + State string + UnPaidAmount float64 + UnPaidLendingFee float64 + type RawTicker struct + BuyAmount float64 + LastTradeVol float64 + SellAmount float64 + type TradeSymbol struct + AmountDecimal int + BaseCurrency string + Name string + PriceDecimal int + QuoteCurrency string + Tradeable bool + type TradeSymbol2 struct + Category string + DailyCloseAt string + DailyOpenAt string + LeveragedMultiple int + LimitAmountMax float64 + LimitAmountMin float64 + MainTag string + MarketOrderEnabled bool