Documentation ¶
Index ¶
- Constants
- type ActiveElement
- type AllBalanceResp
- type AskOrder
- type Balance
- type BalanceResp
- type Balances
- type Base
- type CandleItem
- type CandlesResp
- type ColumnQuotation
- type Currency
- type CurrencyInfo
- type CurrencyResp
- type DepositAddrResp
- type ErrorResp
- type ExtendedTrade
- type OpenOrder
- type OrderBook
- type OrderBookResp
- type OrderDetails
- type OrderDetailsResp
- type OrderType
- type OrdersResp
- type Page
- type PlaceOrderResp
- type PublishStatus
- type Quotation
- type Statuser
- type TickerResp
- type Timestamp
- type Trade
- type TradesResp
- type TradingPair
- type TradingPairResp
- type Transaction
- type TransactionResp
- type TransactionType
- type VotesResp
- type WinnerElement
Constants ¶
View Source
const ( // currency will be added to exchange at unknown date AddUnkown = 0 // currency will be added to exchange at known date (AddToMarketDate) AddKnown = 1 // currency has been added and trading is enabled AddDone = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveElement ¶
type ActiveElement struct { CurrencyInfo Votes int `json:"votes" description:"Number of votes so far"` }
type AllBalanceResp ¶
type BalanceResp ¶
func (BalanceResp) String ¶
func (me BalanceResp) String() string
type Base ¶
type CandleItem ¶ added in v0.0.2
type CandleItem struct { Time Timestamp Open json.Number High json.Number Low json.Number Close json.Number Volume json.Number }
func (*CandleItem) UnmarshalJSON ¶ added in v0.0.2
func (n *CandleItem) UnmarshalJSON(buf []byte) error
type CandlesResp ¶ added in v0.0.2
type CandlesResp struct { Base MoreAvailable bool `json:"more_available" description:"Is more data available?"` Data []CandleItem `json:"data" description:"Actual data"` }
type ColumnQuotation ¶
type ColumnQuotation int
const ( Volume ColumnQuotation = 0 Price ColumnQuotation = 1 )
type Currency ¶ added in v0.0.2
type Currency struct { Name string `json:"name" description:"Name of the currency."` NamePlural string `json:"namePlural" description:"Plural name of the currency."` Decimals int `json:"decimals,int" description:"Number of decimals."` WithdrawalFee json.Number `json:"withdrawalFee,string" description:"Fee in this currency to whitdraw."` MinimalOrder json.Number `json:"minimalOrder,string" description:"Minimal order."` CanWithdraw bool `json:"canWithDraw" description:"Can the currency currently be withdrawn?"` UsdtValue json.Number `json:"usdtValue,string" description:"Value of this currency in USDT."` BtcValue json.Number `json:"btcValue,string" description:"Value of this currency in BTC."` EthValue json.Number `json:"ethValue,string" description:"Value of this currency in ETH."` }
type CurrencyInfo ¶
type CurrencyResp ¶ added in v0.0.2
type DepositAddrResp ¶ added in v0.0.2
type ExtendedTrade ¶
type OpenOrder ¶
type OpenOrder struct { Id uuid.UUID `json:"id" description:"ID"` Created Timestamp `json:"created" description:"Timestamp of order"` Type OrderType `json:"type" description:"Either buy or sell"` Price json.Number `json:"price,string" description:"Price of order."` TakeProfitPrice json.Number `json:"takeeprofit,string" description:"Price to take profit."` Amount json.Number `json:"amount,string" description:"Amount of order."` RemainingAmount json.Number `json:"remainingAmount,string" description:"Remaining amount of order."` CurrencyPair string `json:"currencyPair" description:"Currency pair of order."` }
type OrderBookResp ¶
type OrderDetails ¶
type OrderDetails string
const ( Open OrderDetails = "open" Filled OrderDetails = "filled" Canceled OrderDetails = "canceled" // sic Expired OrderDetails = "expired" )
type OrderDetailsResp ¶
type OrderDetailsResp struct { Base // This order might have a different status than "Open", check OrderStatus OpenOrder Trades []ExtendedTrade `json:"trades" description:"Trades."` OrderStatus OrderDetails `json:"orderStatus" description:"Details about the order"` }
type OrdersResp ¶
type PlaceOrderResp ¶
type PublishStatus ¶
type PublishStatus int
type Quotation ¶
volume, price
func (*Quotation) GetLiquidity ¶
* * Get liquidity in counter currency (e.g., USDT).
type TickerResp ¶
type TickerResp struct { Base Bid json.Number `json:"bid,string" description:"Current best bid."` Ask json.Number `json:"ask,string" description:"Current best bid."` Low json.Number `json:"low,string" description:"Lowest value of requested interval."` High json.Number `json:"high,string" description:"Highest value of requested interval."` Vwap json.Number `json:"vwap,string" description:"Volume weighted average."` Volume json.Number `json:"volume,string" description:"Volume in the requested interval"` VolumeUsdt json.Number `json:"volume_usdt,string" description:"Volume in the requested interval (in USDT)"` }
type Trade ¶
type Trade struct { Id int64 `json:"id" description:"ID"` Datetime Timestamp `json:"datetime" description:"Timestamp of trade"` Price json.Number `json:"price,string" description:"Price of trade."` Amount json.Number `json:"amount,string" description:"Amount of trade."` Type OrderType `json:"type" description:"Either buy or sell"` }
type TradesResp ¶
type TradingPair ¶
type TradingPair struct { PriceDecimals int `json:"priceDecimals" description:"Decimals for price"` AmountDecimals int `json:"amountDecimals" description:"Decimals for amount"` MinAmount json.Number `json:"minAmount" description:"Minimum amount of base currency."` BaseCurrency string `json:"baseCurrency" description:"Base currency."` CounterCurrency string `json:"counterCurrency" description:"Counter currency."` Title string `json:"title" description:"Title."` }
func (TradingPair) String ¶
func (me TradingPair) String() string
type TradingPairResp ¶
type TradingPairResp map[string]TradingPair
type Transaction ¶
type Transaction struct { Id int64 `json:"id" description:"ID"` Datetime Timestamp `json:"datetime" description:"Timestamp of transaction"` Amount json.Number `json:"amount,string" description:"Amount of transaction."` Type TransactionType `json:"type" description:"Type of transaction"` Currency string `json:"currency" description:"Currency of transaction"` }
type TransactionResp ¶
type TransactionResp struct { Page Transactions []Transaction `json:"transactions" description:"Transactions"` }
type TransactionType ¶
type TransactionType string
const ( Deposit TransactionType = "Deposit" Whitdrawal TransactionType = "Whitdrawal" WithdrawalFee TransactionType = "Whitdrawal fee" Trading TransactionType = "Trade" // cannot reuse Trade TradingFee TransactionType = "Trading fee" AccountTransfer TransactionType = "Account transfer" Vote TransactionType = "Vote" )
type VotesResp ¶
type VotesResp struct { Base VotingEndDate Timestamp `json:"votingEndDate" description:"When voting ends"` WinnerList []WinnerElement `json:"winnerList" description:"Winner list"` ActiveList []ActiveElement `json:"activeList" description:"Active voting list"` }
type WinnerElement ¶
type WinnerElement struct { CurrencyInfo TotalVotes int `json:"totalVotes" description:"Number of votes"` WinDate Timestamp `json:"winDate" description:"When the currency has won"` AddToMarketDate Timestamp `json:"addToMarketDate" description:"When the currency will be added to market"` PublishStatus PublishStatus `json:"publishStatus" description:"Is adding currency to market date known?"` }
Click to show internal directories.
Click to hide internal directories.