Documentation ¶
Index ¶
- type AccountFees
- type BTSE
- func (b *BTSE) CancelAllAfter(timeout int) error
- func (b *BTSE) CancelAllOrders(orderCancellation *order.Cancel) (order.CancelAllResponse, error)
- func (b *BTSE) CancelExistingOrder(orderID, symbol, clOrderID string) (CancelOrder, error)
- func (b *BTSE) CancelOrder(order *order.Cancel) error
- func (b *BTSE) CreateOrder(clOrderID string, deviation float64, postOnly bool, price float64, side string, ...) ([]Order, error)
- func (b *BTSE) CreateWalletAddress(currency string) (WalletAddress, error)
- func (b *BTSE) FetchAccountInfo() (account.Holdings, error)
- func (b *BTSE) FetchOrderBook(symbol string, group, limitBids, limitAsks int, spot bool) (*Orderbook, error)
- func (b *BTSE) FetchOrderBookL2(symbol string, depth int) (*Orderbook, error)
- func (b *BTSE) FetchOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (b *BTSE) FetchTicker(p currency.Pair, assetType asset.Item) (*ticker.Price, error)
- func (b *BTSE) FetchTradablePairs(a asset.Item) ([]string, error)
- func (b *BTSE) FormatExchangeKlineInterval(in kline.Interval) string
- func (b *BTSE) GenerateDefaultSubscriptions() ([]stream.ChannelSubscription, error)
- func (b *BTSE) GetActiveOrders(req *order.GetOrdersRequest) ([]order.Detail, error)
- func (b *BTSE) GetDefaultConfig() (*config.ExchangeConfig, error)
- func (b *BTSE) GetDepositAddress(cryptocurrency currency.Code, accountID string) (string, error)
- func (b *BTSE) GetExchangeHistory(p currency.Pair, assetType asset.Item, timestampStart, timestampEnd time.Time) ([]exchange.TradeHistory, error)
- func (b *BTSE) GetFee(feeBuilder *exchange.FeeBuilder) (float64, error)
- func (b *BTSE) GetFeeByType(feeBuilder *exchange.FeeBuilder) (float64, error)
- func (b *BTSE) GetFeeInformation(symbol string) ([]AccountFees, error)
- func (b *BTSE) GetFundingHistory() ([]exchange.FundHistory, error)
- func (b *BTSE) GetHistoricCandles(pair currency.Pair, a asset.Item, start, end time.Time, ...) (kline.Item, error)
- func (b *BTSE) GetHistoricCandlesExtended(pair currency.Pair, a asset.Item, start, end time.Time, ...) (kline.Item, error)
- func (b *BTSE) GetMarketSummary(symbol string, spot bool) (MarketSummary, error)
- func (b *BTSE) GetOrderHistory(getOrdersRequest *order.GetOrdersRequest) ([]order.Detail, error)
- func (b *BTSE) GetOrderHistoryById(getOrdersRequest string) ([]order.Detail, error)
- func (b *BTSE) GetOrderInfo(orderID string) (order.Detail, error)
- func (b *BTSE) GetOrders(symbol, orderID, clOrderID string) ([]OpenOrder, error)
- func (b *BTSE) GetPrice(symbol string) (Price, error)
- func (b *BTSE) GetServerTime() (*ServerTime, error)
- func (b *BTSE) GetTrades(symbol string, start, end time.Time, beforeSerialID, afterSerialID, count int, ...) ([]Trade, error)
- func (b *BTSE) GetWalletAddress(currency string) (WalletAddress, error)
- func (b *BTSE) GetWalletHistory(symbol string, start, end time.Time, count int) (WalletHistory, error)
- func (b *BTSE) GetWalletInformation() ([]CurrencyBalance, error)
- func (b *BTSE) IndexOrderPeg(clOrderID string, deviation float64, postOnly bool, price float64, side string, ...) ([]Order, error)
- func (b *BTSE) ModifyOrder(action *order.Modify) (string, error)
- func (b *BTSE) OHLCV(symbol string, start, end time.Time, resolution int) (OHLCV, error)
- func (b *BTSE) Run()
- func (b *BTSE) SendAuthenticatedHTTPRequest(method, endpoint string, isSpot bool, values url.Values, ...) error
- func (b *BTSE) SendHTTPRequest(method, endpoint string, result interface{}, spotEndpoint bool, ...) error
- func (b *BTSE) SetDefaults()
- func (b *BTSE) Setup(exch *config.ExchangeConfig) error
- func (b *BTSE) Start(wg *sync.WaitGroup)
- func (b *BTSE) SubmitOrder(s *order.Submit) (order.SubmitResponse, error)
- func (b *BTSE) Subscribe(channelsToSubscribe []stream.ChannelSubscription) error
- func (b *BTSE) TradeHistory(symbol string, start, end time.Time, beforeSerialID, afterSerialID, count int, ...) (TradeHistory, error)
- func (b *BTSE) Unsubscribe(channelsToUnsubscribe []stream.ChannelSubscription) error
- func (b *BTSE) UpdateAccountInfo() (account.Holdings, error)
- func (b *BTSE) UpdateOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (b *BTSE) UpdateTicker(p currency.Pair, assetType asset.Item) (*ticker.Price, error)
- func (b *BTSE) UpdateTradablePairs(forceUpdate bool) error
- func (b *BTSE) ValidateCredentials() error
- func (b *BTSE) WalletWithdrawal(currency, address, tag, amount string) (WithdrawalResponse, error)
- func (b *BTSE) WithdrawCryptocurrencyFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *BTSE) WithdrawFiatFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *BTSE) WithdrawFiatFundsToInternationalBank(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *BTSE) WsAuthenticate() error
- func (b *BTSE) WsConnect() error
- type CancelOrder
- type CurrencyBalance
- type ErrorResponse
- type FuturesMarket
- type MarketStatistics
- type MarketSummary
- type OHLCV
- type OpenOrder
- type Order
- type OrderSizeLimit
- type Orderbook
- type Price
- type QuoteData
- type RateLimit
- type ServerTime
- type SpotMarket
- type Ticker
- type Trade
- type TradeHistory
- type WalletAddress
- type WalletHistory
- type WithdrawalResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountFees ¶ added in v0.1.2
type AccountFees struct { MakerFee float64 `json:"makerFee"` Symbol string `json:"symbol"` TakerFee float64 `json:"takerFee"` }
AccountFees stores fee for each currency pair
type BTSE ¶
BTSE is the overarching type across this package
func (*BTSE) CancelAllAfter ¶ added in v0.1.2
CancelAllAfter cancels all orders after timeout
func (*BTSE) CancelAllOrders ¶
CancelAllOrders cancels all orders associated with a currency pair If product ID is sent, all orders of that specified market will be cancelled If not specified, all orders of all markets will be cancelled
func (*BTSE) CancelExistingOrder ¶
func (b *BTSE) CancelExistingOrder(orderID, symbol, clOrderID string) (CancelOrder, error)
CancelExistingOrder cancels an order
func (*BTSE) CancelOrder ¶
CancelOrder cancels an order by its corresponding ID number
func (*BTSE) CreateOrder ¶
func (b *BTSE) CreateOrder(clOrderID string, deviation float64, postOnly bool, price float64, side string, size, stealth, stopPrice float64, symbol, timeInForce string, trailValue, triggerPrice float64, txType, orderType string) ([]Order, error)
CreateOrder creates an order
func (*BTSE) CreateWalletAddress ¶ added in v0.1.2
func (b *BTSE) CreateWalletAddress(currency string) (WalletAddress, error)
CreateWalletAddress create new deposit address for requested currency
func (*BTSE) FetchAccountInfo ¶
FetchAccountInfo retrieves balances for all enabled currencies
func (*BTSE) FetchOrderBook ¶
func (b *BTSE) FetchOrderBook(symbol string, group, limitBids, limitAsks int, spot bool) (*Orderbook, error)
FetchOrderBook gets orderbook data for a given pair
func (*BTSE) FetchOrderBookL2 ¶ added in v0.1.2
FetchOrderBookL2 retrieve level 2 orderbook for requested symbol and depth
func (*BTSE) FetchOrderbook ¶
FetchOrderbook returns orderbook base on the currency pair
func (*BTSE) FetchTicker ¶
FetchTicker returns the ticker for a currency pair
func (*BTSE) FetchTradablePairs ¶
FetchTradablePairs returns a list of the exchanges tradable pairs
func (*BTSE) FormatExchangeKlineInterval ¶ added in v0.1.2
FormatExchangeKlineInterval formats kline interval to exchange requested type
func (*BTSE) GenerateDefaultSubscriptions ¶
func (b *BTSE) GenerateDefaultSubscriptions() ([]stream.ChannelSubscription, error)
GenerateDefaultSubscriptions Adds default subscriptions to websocket to be handled by ManageSubscriptions()
func (*BTSE) GetActiveOrders ¶
GetActiveOrders retrieves any orders that are active/open
func (*BTSE) GetDefaultConfig ¶
func (b *BTSE) GetDefaultConfig() (*config.ExchangeConfig, error)
GetDefaultConfig returns a default exchange config
func (*BTSE) GetDepositAddress ¶
GetDepositAddress returns a deposit address for a specified currency
func (*BTSE) GetExchangeHistory ¶
func (b *BTSE) GetExchangeHistory(p currency.Pair, assetType asset.Item, timestampStart, timestampEnd time.Time) ([]exchange.TradeHistory, error)
GetExchangeHistory returns historic trade data within the timeframe provided.
func (*BTSE) GetFee ¶
func (b *BTSE) GetFee(feeBuilder *exchange.FeeBuilder) (float64, error)
GetFee returns an estimate of fee based on type of transaction
func (*BTSE) GetFeeByType ¶
func (b *BTSE) GetFeeByType(feeBuilder *exchange.FeeBuilder) (float64, error)
GetFeeByType returns an estimate of fee based on type of transaction
func (*BTSE) GetFeeInformation ¶ added in v0.1.2
func (b *BTSE) GetFeeInformation(symbol string) ([]AccountFees, error)
GetFeeInformation retrieve fee's (maker/taker) for requested symbol
func (*BTSE) GetFundingHistory ¶
func (b *BTSE) GetFundingHistory() ([]exchange.FundHistory, error)
GetFundingHistory returns funding history, deposits and withdrawals
func (*BTSE) GetHistoricCandles ¶
func (b *BTSE) GetHistoricCandles(pair currency.Pair, a asset.Item, start, end time.Time, interval kline.Interval) (kline.Item, error)
GetHistoricCandles returns candles between a time period for a set time interval
func (*BTSE) GetHistoricCandlesExtended ¶
func (b *BTSE) GetHistoricCandlesExtended(pair currency.Pair, a asset.Item, start, end time.Time, interval kline.Interval) (kline.Item, error)
GetHistoricCandlesExtended returns candles between a time period for a set time interval
func (*BTSE) GetMarketSummary ¶ added in v0.1.2
func (b *BTSE) GetMarketSummary(symbol string, spot bool) (MarketSummary, error)
GetMarketSummary stores market summary data
func (*BTSE) GetOrderHistory ¶
GetOrderHistory retrieves account order information Can Limit response to specific order status
func (*BTSE) GetOrderHistoryById ¶
GetOrderHistoryById retrieves specified closed order information Can Limit response to specific order status
func (*BTSE) GetOrderInfo ¶
GetOrderInfo returns information on a current open order
func (*BTSE) GetServerTime ¶
func (b *BTSE) GetServerTime() (*ServerTime, error)
GetServerTime returns the exchanges server time
func (*BTSE) GetTrades ¶
func (b *BTSE) GetTrades(symbol string, start, end time.Time, beforeSerialID, afterSerialID, count int, includeOld bool) ([]Trade, error)
GetTrades returns a list of trades for the specified symbol
func (*BTSE) GetWalletAddress ¶ added in v0.1.2
func (b *BTSE) GetWalletAddress(currency string) (WalletAddress, error)
GetWalletAddress returns the users account balance
func (*BTSE) GetWalletHistory ¶ added in v0.1.2
func (b *BTSE) GetWalletHistory(symbol string, start, end time.Time, count int) (WalletHistory, error)
GetWalletHistory returns the users account balance
func (*BTSE) GetWalletInformation ¶ added in v0.1.2
func (b *BTSE) GetWalletInformation() ([]CurrencyBalance, error)
GetWalletInformation returns the users account balance
func (*BTSE) IndexOrderPeg ¶ added in v0.1.2
func (b *BTSE) IndexOrderPeg(clOrderID string, deviation float64, postOnly bool, price float64, side string, size, stealth, stopPrice float64, symbol, timeInForce string, trailValue, triggerPrice float64, txType, orderType string) ([]Order, error)
IndexOrderPeg create peg order that will track a certain percentage above/below the index price
func (*BTSE) ModifyOrder ¶
ModifyOrder will allow of changing orderbook placement and limit to market conversion
func (*BTSE) OHLCV ¶ added in v0.1.2
OHLCV retrieve and return OHLCV candle data for requested symbol
func (*BTSE) SendAuthenticatedHTTPRequest ¶
func (b *BTSE) SendAuthenticatedHTTPRequest(method, endpoint string, isSpot bool, values url.Values, req map[string]interface{}, result interface{}, f request.EndpointLimit) error
SendAuthenticatedHTTPRequest sends an authenticated HTTP request to the desired endpoint
func (*BTSE) SendHTTPRequest ¶
func (b *BTSE) SendHTTPRequest(method, endpoint string, result interface{}, spotEndpoint bool, f request.EndpointLimit) error
SendHTTPRequest sends an HTTP request to the desired endpoint
func (*BTSE) SetDefaults ¶
func (b *BTSE) SetDefaults()
SetDefaults sets the basic defaults for BTSE
func (*BTSE) Setup ¶
func (b *BTSE) Setup(exch *config.ExchangeConfig) error
Setup takes in the supplied exchange configuration details and sets params
func (*BTSE) SubmitOrder ¶
SubmitOrder submits a new order
func (*BTSE) Subscribe ¶
func (b *BTSE) Subscribe(channelsToSubscribe []stream.ChannelSubscription) error
Subscribe sends a websocket message to receive data from the channel
func (*BTSE) TradeHistory ¶ added in v0.1.2
func (b *BTSE) TradeHistory(symbol string, start, end time.Time, beforeSerialID, afterSerialID, count int, includeOld bool, clOrderID, orderID string) (TradeHistory, error)
TradeHistory returns previous trades on exchange
func (*BTSE) Unsubscribe ¶
func (b *BTSE) Unsubscribe(channelsToUnsubscribe []stream.ChannelSubscription) error
Unsubscribe sends a websocket message to stop receiving data from the channel
func (*BTSE) UpdateAccountInfo ¶
UpdateAccountInfo retrieves balances for all enabled currencies for the BTSE exchange
func (*BTSE) UpdateOrderbook ¶
UpdateOrderbook updates and returns the orderbook for a currency pair
func (*BTSE) UpdateTicker ¶
UpdateTicker updates and returns the ticker for a currency pair
func (*BTSE) UpdateTradablePairs ¶
UpdateTradablePairs updates the exchanges available pairs and stores them in the exchanges config
func (*BTSE) ValidateCredentials ¶
ValidateCredentials validates current credentials used for wrapper functionality
func (*BTSE) WalletWithdrawal ¶ added in v0.1.2
func (b *BTSE) WalletWithdrawal(currency, address, tag, amount string) (WithdrawalResponse, error)
WalletWithdrawal submit request to withdraw crypto currency
func (*BTSE) WithdrawCryptocurrencyFunds ¶
func (b *BTSE) WithdrawCryptocurrencyFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawCryptocurrencyFunds returns a withdrawal ID when a withdrawal is submitted
func (*BTSE) WithdrawFiatFunds ¶
func (b *BTSE) WithdrawFiatFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawFiatFunds returns a withdrawal ID when a withdrawal is submitted
func (*BTSE) WithdrawFiatFundsToInternationalBank ¶
func (b *BTSE) WithdrawFiatFundsToInternationalBank(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawFiatFundsToInternationalBank returns a withdrawal ID when a withdrawal is submitted
func (*BTSE) WsAuthenticate ¶
WsAuthenticate Send an authentication message to receive auth data
type CurrencyBalance ¶
type CurrencyBalance struct { Currency string `json:"currency"` Total float64 `json:"total"` Available float64 `json:"available"` }
CurrencyBalance stores the account info data
type ErrorResponse ¶ added in v0.1.2
type ErrorResponse struct { ErrorCode int `json:"errorCode"` Message string `json:"message"` Status int `json:"status"` }
ErrorResponse contains errors received from API
type FuturesMarket ¶
type FuturesMarket struct { Symbol string `json:"symbol"` Last float64 `json:"last"` LowestAsk float64 `json:"lowestAsk"` HighestBid float64 `json:"highestBid"` OpenInterest float64 `json:"openInterest"` OpenInterestUSD float64 `json:"openInterestUSD"` PercentageChange float64 `json:"percentageChange"` Volume float64 `json:"volume"` High24Hr float64 `json:"high24Hr"` Low24Hr float64 `json:"low24Hr"` Base string `json:"base"` Quote string `json:"quote"` ContractStart int64 `json:"contractStart"` ContractEnd int64 `json:"contractEnd"` Active bool `json:"active"` TimeBasedContract bool `json:"timeBasedContract"` OpenTime int64 `json:"openTime"` CloseTime int64 `json:"closeTime"` StartMatching int64 `json:"startMatching"` InactiveTime int64 `json:"inactiveTime"` FundingRate float64 `json:"fundingRate"` ContractSize float64 `json:"contractSize"` MaxPosition int64 `json:"maxPosition"` MinValidPrice float64 `json:"minValidPrice"` MinPriceIncrement float64 `json:"minPriceIncrement"` MinOrderSize int32 `json:"minOrderSize"` MaxOrderSize int32 `json:"maxOrderSize"` MinRiskLimit int32 `json:"minRiskLimit"` MaxRiskLimit int32 `json:"maxRiskLimit"` MinSizeIncrement float64 `json:"minSizeIncrement"` AvailableSettlement []string `json:"availableSettlement"` }
FuturesMarket stores market data
type MarketStatistics ¶
type MarketStatistics struct { Open float64 `json:"open,string"` Low float64 `json:"low,string"` High float64 `json:"high,string"` Close float64 `json:"close,string"` Volume float64 `json:"volume,string"` Time time.Time `json:"time"` }
MarketStatistics stores market statistics for a particular product
type MarketSummary ¶ added in v0.1.2
type MarketSummary []struct { Symbol string `json:"symbol"` Last float64 `json:"last"` LowestAsk float64 `json:"lowestAsk"` HighestBid float64 `json:"highestBid"` PercentageChange float64 `json:"percentageChange"` Volume float64 `json:"volume"` High24Hr float64 `json:"high24Hr"` Low24Hr float64 `json:"low24Hr"` Base string `json:"base"` Quote string `json:"quote"` Active bool `json:"active"` Size float64 `json:"size"` MinValidPrice float64 `json:"minValidPrice"` MinPriceIncrement float64 `json:"minPriceIncrement"` MinOrderSize float64 `json:"minOrderSize"` MaxOrderSize float64 `json:"maxOrderSize"` MinSizeIncrement float64 `json:"minSizeIncrement"` OpenInterest float64 `json:"openInterest"` OpenInterestUSD float64 `json:"openInterestUSD"` ContractStart int64 `json:"contractStart"` ContractEnd int64 `json:"contractEnd"` TimeBasedContract bool `json:"timeBasedContract"` OpenTime int64 `json:"openTime"` CloseTime int64 `json:"closeTime"` StartMatching int64 `json:"startMatching"` InactiveTime int64 `json:"inactiveTime"` FundingRate float64 `json:"fundingRate"` ContractSize float64 `json:"contractSize"` MaxPosition int64 `json:"maxPosition"` MinRiskLimit int `json:"minRiskLimit"` MaxRiskLimit int `json:"maxRiskLimit"` AvailableSettlement []string `json:"availableSettlement"` Futures bool `json:"futures"` }
MarketSummary response data
type OHLCV ¶ added in v0.1.2
type OHLCV [][]float64
OHLCV holds Open, High Low, Close, Volume data for set symbol
type OpenOrder ¶
type OpenOrder struct { AverageFillPrice float64 `json:"averageFillPrice"` CancelDuration int64 `json:"cancelDuration"` ClOrderID string `json:"clOrderID"` FillSize float64 `json:"fillSize"` FilledSize float64 `json:"filledSize"` OrderID string `json:"orderID"` OrderState string `json:"orderState"` OrderType int `json:"orderType"` OrderValue float64 `json:"orderValue"` PegPriceDeviation float64 `json:"pegPriceDeviation"` PegPriceMax float64 `json:"pegPriceMax"` PegPriceMin float64 `json:"pegPriceMin"` Price float64 `json:"price"` Side string `json:"side"` Size float64 `json:"size"` Symbol string `json:"symbol"` Timestamp int64 `json:"timestamp"` TrailValue float64 `json:"trailValue"` TriggerOrder bool `json:"triggerOrder"` TriggerOrderType int `json:"triggerOrderType"` TriggerOriginalPrice float64 `json:"triggerOriginalPrice"` TriggerPrice float64 `json:"triggerPrice"` TriggerStopPrice float64 `json:"triggerStopPrice"` TriggerTrailingStopDeviation float64 `json:"triggerTrailingStopDeviation"` Triggered bool `json:"triggered"` }
OpenOrder stores an open order info
type Order ¶
type Order struct { AverageFillPrice float64 `json:"averageFillPrice"` ClOrderID string `json:"clOrderID"` Deviation float64 `json:"deviation"` FillSize float64 `json:"fillSize"` Message string `json:"message"` OrderID string `json:"orderID"` OrderType int `json:"orderType"` Price float64 `json:"price"` Side string `json:"side"` Size float64 `json:"size"` Status int `json:"status"` Stealth float64 `json:"stealth"` StopPrice float64 `json:"stopPrice"` Symbol string `json:"symbol"` Timestamp int64 `json:"timestamp"` Trigger bool `json:"trigger"` TriggerPrice float64 `json:"triggerPrice"` }
Order stores information for a single order
type OrderSizeLimit ¶ added in v0.1.2
OrderSizeLimit holds accepted minimum, maximum, and size increment when submitting new orders
func OrderSizeLimits ¶ added in v0.1.2
func OrderSizeLimits(pair string) (limits OrderSizeLimit, found bool)
OrderSizeLimits looks up currency pair in orderSizeLimitMap and returns OrderSizeLimit
type Orderbook ¶
type Orderbook struct { BuyQuote []QuoteData `json:"buyQuote"` SellQuote []QuoteData `json:"sellQuote"` Symbol string `json:"symbol"` Timestamp int64 `json:"timestamp"` }
Orderbook stores orderbook info
type Price ¶ added in v0.1.2
type Price []struct { IndexPrice float64 `json:"indexPrice"` LastPrice float64 `json:"lastPrice"` MarkPrice float64 `json:"markPrice"` Symbol string `json:"symbol"` }
Price stores last price for requested symbol
type RateLimit ¶ added in v0.1.2
RateLimit implements the request.Limiter interface
func SetRateLimit ¶ added in v0.1.2
func SetRateLimit() *RateLimit
SetRateLimit returns the rate limit for the exchange
type ServerTime ¶
ServerTime stores the server time data
type SpotMarket ¶
type SpotMarket struct { Symbol string `json:"symbol"` ID string `json:"id"` BaseCurrency string `json:"base_currency"` QuoteCurrency string `json:"quote_currency"` BaseMinSize float64 `json:"base_min_size"` BaseMaxSize float64 `json:"base_max_size"` BaseIncrementSize float64 `json:"base_increment_size"` QuoteMinPrice float64 `json:"quote_min_price"` QuoteIncrement float64 `json:"quote_increment"` Status string `json:"status"` }
SpotMarket stores market data
type Ticker ¶
type Ticker struct { Price float64 `json:"price,string"` Size float64 `json:"size,string"` Bid float64 `json:"bid,string"` Ask float64 `json:"ask,string"` Volume float64 `json:"volume,string"` Time string `json:"time"` }
Ticker stores the ticker data
type Trade ¶
type Trade struct { SerialID int `json:"serialId"` Symbol string `json:"symbol"` Price float64 `json:"price"` Amount float64 `json:"size"` Time int64 `json:"timestamp"` Side string `json:"side"` Type string `json:"type"` }
Trade stores trade data
type TradeHistory ¶ added in v0.1.2
type TradeHistory []struct { Base string `json:"base"` ClOrderID string `json:"clOrderID"` FeeAmount float64 `json:"feeAmount"` FeeCurrency string `json:"feeCurrency"` FilledPrice float64 `json:"filledPrice"` FilledSize float64 `json:"filledSize"` OrderID string `json:"orderId"` OrderType int `json:"orderType"` Price float64 `json:"price"` Quote string `json:"quote"` RealizedPnl float64 `json:"realizedPnl"` SerialID int64 `json:"serialId"` Side string `json:"side"` Size float64 `json:"size"` Symbol string `json:"symbol"` Timestamp string `json:"timestamp"` Total float64 `json:"total"` TradeID string `json:"tradeId"` TriggerPrice float64 `json:"triggerPrice"` TriggerType int `json:"triggerType"` Username string `json:"username"` Wallet string `json:"wallet"` }
TradeHistory stores user trades for exchange
type WalletAddress ¶ added in v0.1.2
WalletAddress stores address for crypto deposit's
type WalletHistory ¶ added in v0.1.2
type WalletHistory []struct { Amount float64 `json:"amount"` Currency string `json:"currency"` Description string `json:"description"` Fees float64 `json:"fees"` OrderID string `json:"orderId"` Status string `json:"status"` Timestamp int64 `json:"timestamp"` Type string `json:"type"` Username string `json:"username"` Wallet string `json:"wallet"` }
WalletHistory stores account funding history
type WithdrawalResponse ¶ added in v0.1.2
type WithdrawalResponse struct {
WithdrawID string `json:"withdraw_id"`
}
WithdrawalResponse response received when submitting a crypto withdrawal request