Documentation ¶
Index ¶
- Constants
- type Balance
- type Balances
- type Bitstamp
- func (b *Bitstamp) CancelAllExistingOrders(ctx context.Context) (bool, error)
- func (b *Bitstamp) CancelAllOrders(ctx context.Context, _ *order.Cancel) (order.CancelAllResponse, error)
- func (b *Bitstamp) CancelBatchOrders(_ context.Context, _ []order.Cancel) (*order.CancelBatchResponse, error)
- func (b *Bitstamp) CancelExistingOrder(ctx context.Context, orderID int64) (CancelOrder, error)
- func (b *Bitstamp) CancelOrder(ctx context.Context, o *order.Cancel) error
- func (b *Bitstamp) CryptoWithdrawal(ctx context.Context, amount float64, address, symbol, destTag string) (*CryptoWithdrawalResponse, error)
- func (b *Bitstamp) FetchAccountInfo(ctx context.Context, assetType asset.Item) (account.Holdings, error)
- func (b *Bitstamp) FetchOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (b *Bitstamp) FetchTicker(ctx context.Context, p currency.Pair, assetType asset.Item) (*ticker.Price, error)
- func (b *Bitstamp) FetchTradablePairs(ctx context.Context, _ asset.Item) (currency.Pairs, error)
- func (b *Bitstamp) FetchWSAuth(ctx context.Context) (*WebsocketAuthResponse, error)
- func (b *Bitstamp) GetAccountFundingHistory(_ context.Context) ([]exchange.FundingHistory, error)
- func (b *Bitstamp) GetAccountTradingFee(ctx context.Context, pair currency.Pair) (TradingFees, error)
- func (b *Bitstamp) GetAccountTradingFees(ctx context.Context) ([]TradingFees, error)
- func (b *Bitstamp) GetActiveOrders(ctx context.Context, req *order.MultiOrderRequest) (order.FilteredOrders, error)
- func (b *Bitstamp) GetBalance(ctx context.Context) (Balances, error)
- func (b *Bitstamp) GetCryptoDepositAddress(ctx context.Context, crypto currency.Code) (*DepositAddress, error)
- func (b *Bitstamp) GetCurrencyTradeURL(_ context.Context, a asset.Item, cp currency.Pair) (string, error)
- func (b *Bitstamp) GetDepositAddress(ctx context.Context, cryptocurrency currency.Code, _, _ string) (*deposit.Address, error)
- func (b *Bitstamp) GetEURUSDConversionRate(ctx context.Context) (EURUSDConversionRate, error)
- func (b *Bitstamp) GetFee(ctx context.Context, feeBuilder *exchange.FeeBuilder) (float64, error)
- func (b *Bitstamp) GetFeeByType(ctx context.Context, feeBuilder *exchange.FeeBuilder) (float64, error)
- func (b *Bitstamp) GetFuturesContractDetails(context.Context, asset.Item) ([]futures.Contract, error)
- func (b *Bitstamp) GetHistoricCandles(ctx context.Context, pair currency.Pair, a asset.Item, interval kline.Interval, ...) (*kline.Item, error)
- func (b *Bitstamp) GetHistoricCandlesExtended(ctx context.Context, pair currency.Pair, a asset.Item, interval kline.Interval, ...) (*kline.Item, error)
- func (b *Bitstamp) GetHistoricTrades(_ context.Context, _ currency.Pair, _ asset.Item, _, _ time.Time) ([]trade.Data, error)
- func (b *Bitstamp) GetLatestFundingRates(context.Context, *fundingrate.LatestRateRequest) ([]fundingrate.LatestRateResponse, error)
- func (b *Bitstamp) GetOpenOrders(ctx context.Context, currencyPair string) ([]Order, error)
- func (b *Bitstamp) GetOrderHistory(ctx context.Context, req *order.MultiOrderRequest) (order.FilteredOrders, error)
- func (b *Bitstamp) GetOrderInfo(ctx context.Context, orderID string, _ currency.Pair, _ asset.Item) (*order.Detail, error)
- func (b *Bitstamp) GetOrderStatus(ctx context.Context, orderID int64) (OrderStatus, error)
- func (b *Bitstamp) GetOrderbook(ctx context.Context, currency string) (*Orderbook, error)
- func (b *Bitstamp) GetRecentTrades(ctx context.Context, p currency.Pair, assetType asset.Item) ([]trade.Data, error)
- func (b *Bitstamp) GetServerTime(_ context.Context, _ asset.Item) (time.Time, error)
- func (b *Bitstamp) GetTicker(ctx context.Context, currency string, hourly bool) (*Ticker, error)
- func (b *Bitstamp) GetTradingPairs(ctx context.Context) ([]TradingPair, error)
- func (b *Bitstamp) GetTransactions(ctx context.Context, currencyPair, timePeriod string) ([]Transactions, error)
- func (b *Bitstamp) GetUnconfirmedBitcoinDeposits(ctx context.Context) ([]UnconfirmedBTCTransactions, error)
- func (b *Bitstamp) GetUserTransactions(ctx context.Context, currencyPair string) ([]UserTransactions, error)
- func (b *Bitstamp) GetWithdrawalRequests(ctx context.Context, timedelta int64) ([]WithdrawalRequests, error)
- func (b *Bitstamp) GetWithdrawalsHistory(ctx context.Context, c currency.Code, _ asset.Item) ([]exchange.WithdrawalHistory, error)
- func (b *Bitstamp) ModifyOrder(_ context.Context, _ *order.Modify) (*order.ModifyResponse, error)
- func (b *Bitstamp) OHLC(ctx context.Context, currency string, start, end time.Time, step, limit string) (resp OHLCResponse, err error)
- func (b *Bitstamp) OpenBankWithdrawal(ctx context.Context, amount float64, ...) (FIATWithdrawalResponse, error)
- func (b *Bitstamp) OpenInternationalBankWithdrawal(ctx context.Context, amount float64, ...) (FIATWithdrawalResponse, error)
- func (b *Bitstamp) PlaceOrder(ctx context.Context, currencyPair string, price, amount float64, ...) (Order, error)
- func (b *Bitstamp) SendAuthenticatedHTTPRequest(ctx context.Context, ep exchange.URL, path string, v2 bool, values url.Values, ...) error
- func (b *Bitstamp) SendHTTPRequest(ctx context.Context, ep exchange.URL, path string, result interface{}) error
- func (b *Bitstamp) SetDefaults()
- func (b *Bitstamp) Setup(exch *config.Exchange) error
- func (b *Bitstamp) SubmitOrder(ctx context.Context, s *order.Submit) (*order.SubmitResponse, error)
- func (b *Bitstamp) SubmitOrders(ctx context.Context, ss ...*order.Submit) ([]*order.SubmitResponse, error)
- func (b *Bitstamp) Subscribe(channelsToSubscribe []subscription.Subscription) error
- func (b *Bitstamp) TransferAccountBalance(ctx context.Context, amount float64, currency, subAccount string, toMain bool) error
- func (b *Bitstamp) Unsubscribe(channelsToUnsubscribe []subscription.Subscription) error
- func (b *Bitstamp) UpdateAccountInfo(ctx context.Context, assetType asset.Item) (account.Holdings, error)
- func (b *Bitstamp) UpdateOrderExecutionLimits(ctx context.Context, a asset.Item) error
- func (b *Bitstamp) UpdateOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (b *Bitstamp) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item) (*ticker.Price, error)
- func (b *Bitstamp) UpdateTickers(_ context.Context, _ asset.Item) error
- func (b *Bitstamp) UpdateTradablePairs(ctx context.Context, forceUpdate bool) error
- func (b *Bitstamp) ValidateAPICredentials(ctx context.Context, assetType asset.Item) error
- func (b *Bitstamp) WithdrawCryptocurrencyFunds(ctx context.Context, withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *Bitstamp) WithdrawFiatFunds(ctx context.Context, withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *Bitstamp) WithdrawFiatFundsToInternationalBank(ctx context.Context, withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *Bitstamp) WsConnect() error
- type CancelOrder
- type CaptureError
- type CryptoWithdrawalResponse
- type DepositAddress
- type EURUSDConversionRate
- type FIATWithdrawalResponse
- type MakerTakerFees
- type OHLCResponse
- type Order
- type OrderStatus
- type Orderbook
- type OrderbookBase
- type Ticker
- type TradingFees
- type TradingPair
- type Transactions
- type UnconfirmedBTCTransactions
- type UserTransactions
- type WebsocketAuthResponse
- type WithdrawalRequests
Constants ¶
const ( Deposit = iota Withdrawal MarketTrade SubAccountTransfer = 14 )
Transaction types
const ( BuyOrder = iota SellOrder )
Order side type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitstamp ¶
Bitstamp is the overarching type across the bitstamp package
func (*Bitstamp) CancelAllExistingOrders ¶
CancelAllExistingOrders cancels all open orders on the exchange
func (*Bitstamp) CancelAllOrders ¶
func (b *Bitstamp) CancelAllOrders(ctx context.Context, _ *order.Cancel) (order.CancelAllResponse, error)
CancelAllOrders cancels all orders associated with a currency pair
func (*Bitstamp) CancelBatchOrders ¶
func (b *Bitstamp) CancelBatchOrders(_ context.Context, _ []order.Cancel) (*order.CancelBatchResponse, error)
CancelBatchOrders cancels an orders by their corresponding ID numbers
func (*Bitstamp) CancelExistingOrder ¶
CancelExistingOrder cancels order by ID
func (*Bitstamp) CancelOrder ¶
CancelOrder cancels an order by its corresponding ID number
func (*Bitstamp) CryptoWithdrawal ¶
func (b *Bitstamp) CryptoWithdrawal(ctx context.Context, amount float64, address, symbol, destTag string) (*CryptoWithdrawalResponse, error)
CryptoWithdrawal withdraws a cryptocurrency into a supplied wallet, returns ID amount - The amount you want withdrawn address - The wallet address of the cryptocurrency symbol - the type of crypto ie "ltc", "btc", "eth" destTag - only for XRP default to ""
func (*Bitstamp) FetchAccountInfo ¶
func (b *Bitstamp) FetchAccountInfo(ctx context.Context, assetType asset.Item) (account.Holdings, error)
FetchAccountInfo retrieves balances for all enabled currencies
func (*Bitstamp) FetchOrderbook ¶
func (b *Bitstamp) FetchOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
FetchOrderbook returns the orderbook for a currency pair
func (*Bitstamp) FetchTicker ¶
func (b *Bitstamp) FetchTicker(ctx context.Context, p currency.Pair, assetType asset.Item) (*ticker.Price, error)
FetchTicker returns the ticker for a currency pair
func (*Bitstamp) FetchTradablePairs ¶
FetchTradablePairs returns a list of the exchanges tradable pairs
func (*Bitstamp) FetchWSAuth ¶
func (b *Bitstamp) FetchWSAuth(ctx context.Context) (*WebsocketAuthResponse, error)
FetchWSAuth Retrieves a userID and auth-token from REST for subscribing to a websocket channel The token life-expectancy is only about 60s; use it immediately and do not store it
func (*Bitstamp) GetAccountFundingHistory ¶
GetAccountFundingHistory returns funding history, deposits and withdrawals
func (*Bitstamp) GetAccountTradingFee ¶
func (b *Bitstamp) GetAccountTradingFee(ctx context.Context, pair currency.Pair) (TradingFees, error)
GetAccountTradingFee returns a TradingFee for a pair
func (*Bitstamp) GetAccountTradingFees ¶
func (b *Bitstamp) GetAccountTradingFees(ctx context.Context) ([]TradingFees, error)
GetAccountTradingFees returns a slice of TradingFee
func (*Bitstamp) GetActiveOrders ¶
func (b *Bitstamp) GetActiveOrders(ctx context.Context, req *order.MultiOrderRequest) (order.FilteredOrders, error)
GetActiveOrders retrieves any orders that are active/open
func (*Bitstamp) GetBalance ¶
GetBalance returns full balance of currency held on the exchange
func (*Bitstamp) GetCryptoDepositAddress ¶
func (b *Bitstamp) GetCryptoDepositAddress(ctx context.Context, crypto currency.Code) (*DepositAddress, error)
GetCryptoDepositAddress returns a depositing address by crypto. crypto - example "btc", "ltc", "eth", "xrp" or "bch"
func (*Bitstamp) GetCurrencyTradeURL ¶
func (b *Bitstamp) GetCurrencyTradeURL(_ context.Context, a asset.Item, cp currency.Pair) (string, error)
GetCurrencyTradeURL returns the URL to the exchange's trade page for the given asset and currency pair
func (*Bitstamp) GetDepositAddress ¶
func (b *Bitstamp) GetDepositAddress(ctx context.Context, cryptocurrency currency.Code, _, _ string) (*deposit.Address, error)
GetDepositAddress returns a deposit address for a specified currency
func (*Bitstamp) GetEURUSDConversionRate ¶
func (b *Bitstamp) GetEURUSDConversionRate(ctx context.Context) (EURUSDConversionRate, error)
GetEURUSDConversionRate returns the conversion rate between Euro and USD
func (*Bitstamp) GetFeeByType ¶
func (b *Bitstamp) GetFeeByType(ctx context.Context, feeBuilder *exchange.FeeBuilder) (float64, error)
GetFeeByType returns an estimate of fee based on type of transaction
func (*Bitstamp) GetFuturesContractDetails ¶
func (b *Bitstamp) GetFuturesContractDetails(context.Context, asset.Item) ([]futures.Contract, error)
GetFuturesContractDetails returns all contracts from the exchange by asset type
func (*Bitstamp) GetHistoricCandles ¶
func (b *Bitstamp) GetHistoricCandles(ctx context.Context, pair currency.Pair, a asset.Item, interval kline.Interval, start, end time.Time) (*kline.Item, error)
GetHistoricCandles returns candles between a time period for a set time interval
func (*Bitstamp) GetHistoricCandlesExtended ¶
func (b *Bitstamp) GetHistoricCandlesExtended(ctx context.Context, pair currency.Pair, a asset.Item, interval kline.Interval, start, end time.Time) (*kline.Item, error)
GetHistoricCandlesExtended returns candles between a time period for a set time interval
func (*Bitstamp) GetHistoricTrades ¶
func (b *Bitstamp) GetHistoricTrades(_ context.Context, _ currency.Pair, _ asset.Item, _, _ time.Time) ([]trade.Data, error)
GetHistoricTrades returns historic trade data within the timeframe provided
func (*Bitstamp) GetLatestFundingRates ¶
func (b *Bitstamp) GetLatestFundingRates(context.Context, *fundingrate.LatestRateRequest) ([]fundingrate.LatestRateResponse, error)
GetLatestFundingRates returns the latest funding rates data
func (*Bitstamp) GetOpenOrders ¶
GetOpenOrders returns all open orders on the exchange
func (*Bitstamp) GetOrderHistory ¶
func (b *Bitstamp) GetOrderHistory(ctx context.Context, req *order.MultiOrderRequest) (order.FilteredOrders, error)
GetOrderHistory retrieves account order information Can Limit response to specific order status
func (*Bitstamp) GetOrderInfo ¶
func (b *Bitstamp) GetOrderInfo(ctx context.Context, orderID string, _ currency.Pair, _ asset.Item) (*order.Detail, error)
GetOrderInfo returns order information based on order ID
func (*Bitstamp) GetOrderStatus ¶
GetOrderStatus returns an the status of an order by its ID
func (*Bitstamp) GetOrderbook ¶
GetOrderbook Returns a JSON dictionary with "bids" and "asks". Each is a list of open orders and each order is represented as a list holding the price and the amount.
func (*Bitstamp) GetRecentTrades ¶
func (b *Bitstamp) GetRecentTrades(ctx context.Context, p currency.Pair, assetType asset.Item) ([]trade.Data, error)
GetRecentTrades returns the most recent trades for a currency and asset
func (*Bitstamp) GetServerTime ¶
GetServerTime returns the current exchange server time.
func (*Bitstamp) GetTradingPairs ¶
func (b *Bitstamp) GetTradingPairs(ctx context.Context) ([]TradingPair, error)
GetTradingPairs returns a list of trading pairs which Bitstamp currently supports
func (*Bitstamp) GetTransactions ¶
func (b *Bitstamp) GetTransactions(ctx context.Context, currencyPair, timePeriod string) ([]Transactions, error)
GetTransactions returns transaction information value parameter ["time"] = "minute", "hour", "day" will collate your response into time intervals.
func (*Bitstamp) GetUnconfirmedBitcoinDeposits ¶
func (b *Bitstamp) GetUnconfirmedBitcoinDeposits(ctx context.Context) ([]UnconfirmedBTCTransactions, error)
GetUnconfirmedBitcoinDeposits returns unconfirmed transactions
func (*Bitstamp) GetUserTransactions ¶
func (b *Bitstamp) GetUserTransactions(ctx context.Context, currencyPair string) ([]UserTransactions, error)
GetUserTransactions returns an array of transactions
func (*Bitstamp) GetWithdrawalRequests ¶
func (b *Bitstamp) GetWithdrawalRequests(ctx context.Context, timedelta int64) ([]WithdrawalRequests, error)
GetWithdrawalRequests returns withdrawal requests for the account timedelta - positive integer with max value 50000000 which returns requests from number of seconds ago to now.
func (*Bitstamp) GetWithdrawalsHistory ¶
func (b *Bitstamp) GetWithdrawalsHistory(ctx context.Context, c currency.Code, _ asset.Item) ([]exchange.WithdrawalHistory, error)
GetWithdrawalsHistory returns previous withdrawals data
func (*Bitstamp) ModifyOrder ¶
ModifyOrder will allow of changing orderbook placement and limit to market conversion
func (*Bitstamp) OHLC ¶
func (b *Bitstamp) OHLC(ctx context.Context, currency string, start, end time.Time, step, limit string) (resp OHLCResponse, err error)
OHLC returns OHLCV data for step (interval)
func (*Bitstamp) OpenBankWithdrawal ¶
func (b *Bitstamp) OpenBankWithdrawal(ctx context.Context, amount float64, currency, name, iban, bic, address, postalCode, city, country, comment, withdrawalType string) (FIATWithdrawalResponse, error)
OpenBankWithdrawal Opens a bank withdrawal request (SEPA or international)
func (*Bitstamp) OpenInternationalBankWithdrawal ¶
func (b *Bitstamp) OpenInternationalBankWithdrawal(ctx context.Context, amount float64, currency, name, iban, bic, address, postalCode, city, country, bankName, bankAddress, bankPostCode, bankCity, bankCountry, internationalCurrency, comment, withdrawalType string) (FIATWithdrawalResponse, error)
OpenInternationalBankWithdrawal Opens a bank withdrawal request (international)
func (*Bitstamp) PlaceOrder ¶
func (b *Bitstamp) PlaceOrder(ctx context.Context, currencyPair string, price, amount float64, buy, market bool) (Order, error)
PlaceOrder places an order on the exchange.
func (*Bitstamp) SendAuthenticatedHTTPRequest ¶
func (b *Bitstamp) SendAuthenticatedHTTPRequest(ctx context.Context, ep exchange.URL, path string, v2 bool, values url.Values, result interface{}) error
SendAuthenticatedHTTPRequest sends an authenticated request
func (*Bitstamp) SendHTTPRequest ¶
func (b *Bitstamp) SendHTTPRequest(ctx context.Context, ep exchange.URL, path string, result interface{}) error
SendHTTPRequest sends an unauthenticated HTTP request
func (*Bitstamp) SetDefaults ¶
func (b *Bitstamp) SetDefaults()
SetDefaults sets default for Bitstamp
func (*Bitstamp) SubmitOrder ¶
SubmitOrder submits a new order
func (*Bitstamp) SubmitOrders ¶ added in v1.0.7
func (*Bitstamp) Subscribe ¶
func (b *Bitstamp) Subscribe(channelsToSubscribe []subscription.Subscription) error
Subscribe sends a websocket message to receive data from the channel
func (*Bitstamp) TransferAccountBalance ¶
func (b *Bitstamp) TransferAccountBalance(ctx context.Context, amount float64, currency, subAccount string, toMain bool) error
TransferAccountBalance transfers funds from either a main or sub account amount - to transfers currency - which currency to transfer subaccount - name of account toMain - bool either to or from account
func (*Bitstamp) Unsubscribe ¶
func (b *Bitstamp) Unsubscribe(channelsToUnsubscribe []subscription.Subscription) error
Unsubscribe sends a websocket message to stop receiving data from the channel
func (*Bitstamp) UpdateAccountInfo ¶
func (b *Bitstamp) UpdateAccountInfo(ctx context.Context, assetType asset.Item) (account.Holdings, error)
UpdateAccountInfo retrieves balances for all enabled currencies for the Bitstamp exchange
func (*Bitstamp) UpdateOrderExecutionLimits ¶
UpdateOrderExecutionLimits sets exchange execution order limits for an asset type
func (*Bitstamp) UpdateOrderbook ¶
func (b *Bitstamp) UpdateOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
UpdateOrderbook updates and returns the orderbook for a currency pair
func (*Bitstamp) UpdateTicker ¶
func (b *Bitstamp) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item) (*ticker.Price, error)
UpdateTicker updates and returns the ticker for a currency pair
func (*Bitstamp) UpdateTickers ¶
UpdateTickers updates the ticker for all currency pairs of a given asset type
func (*Bitstamp) UpdateTradablePairs ¶
UpdateTradablePairs updates the exchanges available pairs and stores them in the exchanges config
func (*Bitstamp) ValidateAPICredentials ¶
ValidateAPICredentials validates current credentials used for wrapper functionality
func (*Bitstamp) WithdrawCryptocurrencyFunds ¶
func (b *Bitstamp) WithdrawCryptocurrencyFunds(ctx context.Context, withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawCryptocurrencyFunds returns a withdrawal ID when a withdrawal is submitted
func (*Bitstamp) WithdrawFiatFunds ¶
func (b *Bitstamp) WithdrawFiatFunds(ctx context.Context, withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawFiatFunds returns a withdrawal ID when a withdrawal is submitted
func (*Bitstamp) WithdrawFiatFundsToInternationalBank ¶
func (b *Bitstamp) WithdrawFiatFundsToInternationalBank(ctx context.Context, withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawFiatFundsToInternationalBank returns a withdrawal ID when a withdrawal is submitted
type CancelOrder ¶
type CancelOrder struct { Price float64 `json:"price"` Amount float64 `json:"amount"` Type int `json:"type"` ID int64 `json:"id"` }
CancelOrder holds the order cancellation info
type CaptureError ¶
type CaptureError struct { Status interface{} `json:"status"` Reason interface{} `json:"reason"` Code interface{} `json:"code"` Error interface{} `json:"error"` }
CaptureError is used to capture unmarshalled errors
type CryptoWithdrawalResponse ¶
type CryptoWithdrawalResponse struct {
ID int64 `json:"withdrawal_id"`
}
CryptoWithdrawalResponse response from a crypto withdrawal request
type DepositAddress ¶
type DepositAddress struct { Address string `json:"address"` DestinationTag int64 `json:"destination_tag"` }
DepositAddress holds the deposit info
type EURUSDConversionRate ¶
type EURUSDConversionRate struct { Buy float64 `json:"buy,string"` Sell float64 `json:"sell,string"` }
EURUSDConversionRate holds buy sell conversion rate information
type FIATWithdrawalResponse ¶
type FIATWithdrawalResponse struct {
ID int64 `json:"withdrawal_id"`
}
FIATWithdrawalResponse response from a fiat withdrawal request
type MakerTakerFees ¶
type MakerTakerFees struct { Maker float64 `json:"maker,string"` Taker float64 `json:"taker,string"` }
MakerTakerFees holds maker and taker fee information
type OHLCResponse ¶
type OHLCResponse struct { Data struct { Pair string `json:"pair"` OHLCV []struct { Timestamp int64 `json:"timestamp,string"` Open float64 `json:"open,string"` High float64 `json:"high,string"` Low float64 `json:"low,string"` Close float64 `json:"close,string"` Volume float64 `json:"volume,string"` } `json:"ohlc"` } `json:"data"` }
OHLCResponse holds returned candle data
type Order ¶
type Order struct { ID int64 `json:"id,string"` DateTime string `json:"datetime"` Type int `json:"type,string"` Price float64 `json:"price,string"` Amount float64 `json:"amount,string"` AmountAtCreate float64 `json:"amount_at_create,string"` Currency string `json:"currency_pair"` LimitPrice float64 `json:"limit_price,string"` ClientOrderID string `json:"client_order_id"` Market string `json:"market"` }
Order holds current open order data
type OrderStatus ¶
type OrderStatus struct { AmountRemaining float64 `json:"amount_remaining,string"` Type int `json:"type"` ID string `json:"id"` DateTime string `json:"datetime"` Status string `json:"status"` ClientOrderID string `json:"client_order_id"` Market string `json:"market"` Transactions []struct { TradeID int64 `json:"tid"` FromCurrency float64 `json:"{from_currency},string"` ToCurrency float64 `json:"{to_currency},string"` Price float64 `json:"price,string"` Fee float64 `json:"fee,string"` DateTime string `json:"datetime"` Type int `json:"type"` } }
OrderStatus holds order status information
type Orderbook ¶
type Orderbook struct { Timestamp int64 `json:"timestamp,string"` Bids []OrderbookBase Asks []OrderbookBase }
Orderbook holds orderbook information
type OrderbookBase ¶
OrderbookBase holds singular price information
type Ticker ¶
type Ticker struct { Last float64 `json:"last,string"` High float64 `json:"high,string"` Low float64 `json:"low,string"` Vwap float64 `json:"vwap,string"` Volume float64 `json:"volume,string"` Bid float64 `json:"bid,string"` Ask float64 `json:"ask,string"` Timestamp int64 `json:"timestamp,string"` Open float64 `json:"open,string"` Open24 float64 `json:"open_24,string"` Side orderSide `json:"side,string"` PercentChange24 float64 `json:"percent_change_24,string"` }
Ticker holds ticker information
type TradingFees ¶
type TradingFees struct { Symbol string `json:"currency_pair"` Fees MakerTakerFees `json:"fees"` }
TradingFees holds trading fee information
type TradingPair ¶
type TradingPair struct { Name string `json:"name"` URLSymbol string `json:"url_symbol"` BaseDecimals int `json:"base_decimals"` CounterDecimals int `json:"counter_decimals"` MinimumOrder float64 Trading string `json:"trading"` Description string `json:"description"` }
TradingPair holds trading pair information
func (*TradingPair) UnmarshalJSON ¶
func (p *TradingPair) UnmarshalJSON(data []byte) error
UnmarshalJSON deserializes JSON, and timestamp information.
type Transactions ¶
type Transactions struct { Date int64 `json:"date,string"` TradeID int64 `json:"tid,string"` Price float64 `json:"price,string"` Type int `json:"type,string"` Amount float64 `json:"amount,string"` }
Transactions holds transaction data
type UnconfirmedBTCTransactions ¶
type UnconfirmedBTCTransactions struct { Address string `json:"address"` DestinationTag int `json:"destination_tag"` MemoID string `json:"memo_id"` }
UnconfirmedBTCTransactions holds address information about unconfirmed transactions
type UserTransactions ¶
type UserTransactions struct { Date string `json:"datetime"` TransactionID int64 `json:"id"` Type int `json:"type,string"` USD float64 `json:"usd"` EUR float64 `json:"eur"` BTC float64 `json:"btc"` XRP float64 `json:"xrp"` BTCUSD float64 `json:"btc_usd"` Fee float64 `json:"fee,string"` OrderID int64 `json:"order_id"` }
UserTransactions holds user transaction information
type WebsocketAuthResponse ¶
type WebsocketAuthResponse struct { Token string `json:"token"` UserID int64 `json:"user_id"` ValidSecs int64 `json:"valid_sec"` }
WebsocketAuthResponse holds the auth token for subscribing to auth channels
type WithdrawalRequests ¶
type WithdrawalRequests struct { OrderID int64 `json:"id"` Date string `json:"datetime"` Type int64 `json:"type"` Amount float64 `json:"amount,string"` Status int64 `json:"status"` Currency currency.Code `json:"currency"` Address string `json:"address"` TransactionID string `json:"transaction_id"` Network string `json:"network"` TxID int64 `json:"txid"` }
WithdrawalRequests holds request information on withdrawals