Documentation ¶
Index ¶
- func DoHttp(method string, apimethod string, url string) ([]byte, error)
- func DoPostHttp(method string, apimethod string, data interface{}) ([]byte, error)
- func ToFloat(s string) float64
- type API
- type Address
- type CancelResponse
- type Coin
- type CoinsResponse
- type DepositStatusResponse
- type Error
- type ErrorMsg
- type FixedTransactionResponse
- type LimitResponse
- type ListTransactionsAPIResponse
- type MarketInfoResponse
- type New
- type NewFixedTransactionResponse
- type NewTransactionResponse
- type Pair
- type RateResponse
- type Receipt
- type ReceiptResponse
- type RecentTranxResponse
- type TimeRemainingResponse
- type Transaction
- type ValidateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoPostHttp ¶
Types ¶
type API ¶
func (API) ListTransactions ¶
func (i API) ListTransactions() ([]Transaction, error)
type Address ¶
type Address struct {
Id string `json:"address"`
}
func (Address) Cancel ¶
func (n Address) Cancel() (*CancelResponse, error)
type CancelResponse ¶
type Coin ¶
type Coin struct { Name string `json:"name"` Symbol string `json:"symbol"` Status string `json:"status"` Image string `json:"image,omitempty"` SpecialReturn bool `json:"specialReturn,omitempty"` SpecialOutgoing bool `json:"specialOutgoing,omitempty"` SpecialIncoming bool `json:"specialIncoming,omitempty"` FieldName string `json:"fieldName,omitempty"` FieldKey string `json:"fieldKey,omitempty"` QrName string `json:"qrName,omitempty"` }
func CoinsAsList ¶
type CoinsResponse ¶
type CoinsResponse struct { FIRST struct { Coin } `json:"1ST"` ANT struct { Coin } `json:"ANT"` BAT struct { Coin } `json:"BAT"` BCH struct { Coin } `json:"BCH"` BCY struct { Coin } `json:"BCY"` BLK struct { Coin } `json:"BLK"` BNT struct { Coin } `json:"BNT"` BTC struct { Coin } `json:"BTC"` BTCD struct { Coin } `json:"BTCD"` BTG struct { Coin } `json:"BTG"` BTS struct { Coin } `json:"BTS"` CLAM struct { Coin } `json:"CLAM"` CVC struct { Coin } `json:"CVC"` DASH struct { Coin } `json:"DASH"` DCR struct { Coin } `json:"DCR"` DGB struct { Coin } `json:"DGB"` DNT struct { Coin } `json:"DNT"` DOGE struct { Coin } `json:"DOGE"` EDG struct { Coin } `json:"EDG"` EMC struct { Coin } `json:"EMC"` EOS struct { Coin } `json:"EOS"` ETC struct { Coin } `json:"ETC"` ETH struct { Coin } `json:"ETH"` FCT struct { Coin } `json:"FCT"` FUN struct { Coin } `json:"FUN"` GAME struct { Coin } `json:"GAME"` GNO struct { Coin } `json:"GNO"` GNT struct { Coin } `json:"GNT"` GUP struct { Coin } `json:"GUP"` KMD struct { Coin } `json:"KMD"` LBC struct { Coin } `json:"LBC"` LSK struct { Coin } `json:"LSK"` LTC struct { Coin } `json:"LTC"` MAID struct { Coin } `json:"MAID"` MLN struct { Coin } `json:"MLN"` MONA struct { Coin } `json:"MONA"` MSC struct { Coin } `json:"MSC"` MTL struct { Coin } `json:"MTL"` NBT struct { Coin } `json:"NBT"` NEO struct { Coin } `json:"NEO"` NMC struct { Coin } `json:"NMC"` NMR struct { Coin } `json:"NMR"` NVC struct { Coin } `json:"NVC"` NXT struct { Coin } `json:"NXT"` OMG struct { Coin } `json:"OMG"` POT struct { Coin } `json:"POT"` PPC struct { Coin } `json:"PPC"` QTUM struct { Coin } `json:"QTUM"` RCN struct { Coin } `json:"RCN"` RDD struct { Coin } `json:"RDD"` REP struct { Coin } `json:"REP"` RLC struct { Coin } `json:"RLC"` SALT struct { Coin } `json:"SALT"` SC struct { Coin } `json:"SC"` SNGLS struct { Coin } `json:"SNGLS"` SNT struct { Coin } `json:"SNT"` START struct { Coin } `json:"START"` STEEM struct { Coin } `json:"STEEM"` STORJ struct { Coin } `json:"STORJ"` SWT struct { Coin } `json:"SWT"` TRST struct { Coin } `json:"TRST"` USDT struct { Coin } `json:"USDT"` VOX struct { Coin } `json:"VOX"` VRC struct { Coin } `json:"VRC"` VTC struct { Coin } `json:"VTC"` WAVES struct { Coin } `json:"WAVES"` WINGS struct { Coin } `json:"WINGS"` XCP struct { Coin } `json:"XCP"` XEM struct { Coin } `json:"XEM"` XMR struct { Coin } `json:"XMR"` XRP struct { Coin } `json:"XRP"` ZEC struct { Coin } `json:"ZEC"` ZRX struct { Coin } `json:"ZRX"` }
func Coins ¶
func Coins() (*CoinsResponse, error)
type DepositStatusResponse ¶
type DepositStatusResponse struct { Status string `json:"status"` Address string `json:"address"` Withdraw string `json:"withdraw,omitempty"` IncomingCoin float64 `json:"incomingCoin,omitempty"` IncomingType string `json:"incomingType,omitempty"` OutgoingCoin string `json:"outgoingCoin,omitempty"` OutgoingType string `json:"outgoingType,omitempty"` Transaction string `json:"transaction,omitempty"` Error }
func DepositStatus ¶
func DepositStatus(addr string) (*DepositStatusResponse, error)
type ErrorMsg ¶
type ErrorMsg interface { ErrorMsg() string // contains filtered or unexported methods }
type FixedTransactionResponse ¶
type FixedTransactionResponse struct { Response NewFixedTransactionResponse `json:"success"` Error }
type LimitResponse ¶
type ListTransactionsAPIResponse ¶
type ListTransactionsAPIResponse struct { Transactions []Transaction Error }
type MarketInfoResponse ¶
type MarketInfoResponse struct { Pair string `json:"pair,omitempty"` Rate float64 `json:"rate,string,omitempty"` Limit float64 `json:"limit,omitempty"` Min float64 `json:"min,omitempty"` MinerFee float64 `json:"minerFee,omitempty"` Error }
func MarketInfo ¶
func MarketInfo() ([]MarketInfoResponse, error)
type New ¶
type New struct { Pair string `json:"pair,omitempty"` ToAddress string `json:"withdrawal"` FromAddress string `json:"returnAddress,omitempty"` DestTag string `json:"destTag,omitempty"` RsAddress string `json:"rsAddress,omitempty"` ApiKey string `json:"apiKey,omitempty"` Amount float64 `json:"amount,omitempty"` }
func (New) FixedShift ¶
func (n New) FixedShift() (*NewFixedTransactionResponse, error)
func (New) Shift ¶
func (n New) Shift() (*NewTransactionResponse, error)
type NewFixedTransactionResponse ¶
type NewFixedTransactionResponse struct { OrderID string `json:"orderId"` Pair string `json:"pair,omitempty"` Withdrawal string `json:"withdrawal"` WithdrawalAmount string `json:"withdrawalAmount"` Deposit string `json:"deposit"` DepositAmount string `json:"depositAmount"` Expiration int64 `json:"expiration"` QuotedRate string `json:"quotedRate"` MaxLimit float64 `json:"maxLimit"` ReturnAddress string `json:"returnAddress"` APIPubKey string `json:"apiPubKey"` MinerFee string `json:"minerFee"` Error }
type NewTransactionResponse ¶
type Pair ¶
type Pair struct {
Name string `json:"pair,omitempty"`
}
func (Pair) GetInfo ¶
func (p Pair) GetInfo() (*MarketInfoResponse, error)
type RateResponse ¶
type ReceiptResponse ¶
type RecentTranxResponse ¶
type RecentTranxResponse []struct { CurIn string `json:"curIn"` CurOut string `json:"curOut"` Timestamp float64 `json:"timestamp"` Amount float64 `json:"amount"` Error }
func RecentTransactions ¶
func RecentTransactions(count string) (*RecentTranxResponse, error)
type TimeRemainingResponse ¶
type TimeRemainingResponse struct { Status string `json:"status"` Seconds string `json:"seconds_remaining"` Error }
func TimeRemaining ¶
func TimeRemaining(addr string) (*TimeRemainingResponse, error)
type Transaction ¶
type Transaction struct { InputTXID string `json:"inputTXID"` InputAddress string `json:"inputAddress"` InputCurrency string `json:"inputCurrency,omitempty"` InputAmount float64 `json:"inputAmount,omitempty"` OutputTXID string `json:"outputTXID,omitempty"` OutputAddress string `json:"outputAddress,omitempty"` OutputCurrency string `json:"outputCurrency,omitempty"` OutputAmount string `json:"outputAmount,omitempty"` ShiftRate string `json:"shiftRate,omitempty"` Status string `json:"status,omitempty"` }
type ValidateResponse ¶
Click to show internal directories.
Click to hide internal directories.