Documentation ¶
Index ¶
- Variables
- type AuthResponse
- type CancelledOrder
- type CryptoPaymentProvider
- type EXMO
- func (e *EXMO) CancelAllOrders(ctx context.Context, _ *order.Cancel) (order.CancelAllResponse, error)
- func (e *EXMO) CancelBatchOrders(_ context.Context, _ []order.Cancel) (*order.CancelBatchResponse, error)
- func (e *EXMO) CancelExistingOrder(ctx context.Context, orderID int64) error
- func (e *EXMO) CancelOrder(ctx context.Context, o *order.Cancel) error
- func (e *EXMO) CreateOrder(ctx context.Context, pair, orderType string, price, amount float64) (int64, error)
- func (e *EXMO) ExcodeCreate(ctx context.Context, currency string, amount float64) (ExcodeCreate, error)
- func (e *EXMO) ExcodeLoad(ctx context.Context, excode string) (ExcodeLoad, error)
- func (e *EXMO) FetchAccountInfo(ctx context.Context, assetType asset.Item) (account.Holdings, error)
- func (e *EXMO) FetchOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (e *EXMO) FetchTicker(ctx context.Context, p currency.Pair, assetType asset.Item) (*ticker.Price, error)
- func (e *EXMO) FetchTradablePairs(ctx context.Context, a asset.Item) (currency.Pairs, error)
- func (e *EXMO) GetAccountFundingHistory(ctx context.Context) ([]exchange.FundingHistory, error)
- func (e *EXMO) GetActiveOrders(ctx context.Context, req *order.MultiOrderRequest) (order.FilteredOrders, error)
- func (e *EXMO) GetAvailableTransferChains(ctx context.Context, cryptocurrency currency.Code) ([]string, error)
- func (e *EXMO) GetCancelledOrders(ctx context.Context, offset, limit string) ([]CancelledOrder, error)
- func (e *EXMO) GetCryptoDepositAddress(ctx context.Context) (map[string]string, error)
- func (e *EXMO) GetCryptoPaymentProvidersList(ctx context.Context) (map[string][]CryptoPaymentProvider, error)
- func (e *EXMO) GetCurrency(ctx context.Context) ([]string, error)
- func (e *EXMO) GetCurrencyTradeURL(_ context.Context, a asset.Item, cp currency.Pair) (string, error)
- func (e *EXMO) GetDepositAddress(ctx context.Context, cryptocurrency currency.Code, _, chain string) (*deposit.Address, error)
- func (e *EXMO) GetFee(feeBuilder *exchange.FeeBuilder) (float64, error)
- func (e *EXMO) GetFeeByType(ctx context.Context, feeBuilder *exchange.FeeBuilder) (float64, error)
- func (e *EXMO) GetFuturesContractDetails(context.Context, asset.Item) ([]futures.Contract, error)
- func (e *EXMO) GetHistoricCandles(_ context.Context, _ currency.Pair, _ asset.Item, _ kline.Interval, ...) (*kline.Item, error)
- func (e *EXMO) GetHistoricCandlesExtended(_ context.Context, _ currency.Pair, _ asset.Item, _ kline.Interval, ...) (*kline.Item, error)
- func (e *EXMO) GetHistoricTrades(_ context.Context, _ currency.Pair, _ asset.Item, _, _ time.Time) ([]trade.Data, error)
- func (e *EXMO) GetLatestFundingRates(context.Context, *fundingrate.LatestRateRequest) ([]fundingrate.LatestRateResponse, error)
- func (e *EXMO) GetOpenOrders(ctx context.Context) (map[string]OpenOrders, error)
- func (e *EXMO) GetOrderHistory(ctx context.Context, req *order.MultiOrderRequest) (order.FilteredOrders, error)
- func (e *EXMO) GetOrderInfo(_ context.Context, _ string, _ currency.Pair, _ asset.Item) (*order.Detail, error)
- func (e *EXMO) GetOrderTrades(ctx context.Context, orderID int64) (OrderTrades, error)
- func (e *EXMO) GetOrderbook(ctx context.Context, symbol string) (map[string]Orderbook, error)
- func (e *EXMO) GetPairSettings(ctx context.Context) (map[string]PairSettings, error)
- func (e *EXMO) GetRecentTrades(ctx context.Context, p currency.Pair, assetType asset.Item) ([]trade.Data, error)
- func (e *EXMO) GetRequiredAmount(ctx context.Context, pair string, amount float64) (RequiredAmount, error)
- func (e *EXMO) GetServerTime(_ context.Context, _ asset.Item) (time.Time, error)
- func (e *EXMO) GetTicker(ctx context.Context) (map[string]Ticker, error)
- func (e *EXMO) GetTrades(ctx context.Context, symbol string) (map[string][]Trades, error)
- func (e *EXMO) GetUserInfo(ctx context.Context) (UserInfo, error)
- func (e *EXMO) GetUserTrades(ctx context.Context, pair, offset, limit string) (map[string][]UserTrades, error)
- func (e *EXMO) GetWalletHistory(ctx context.Context, date int64) (WalletHistory, error)
- func (e *EXMO) GetWithdrawTXID(ctx context.Context, taskID int64) (string, error)
- func (e *EXMO) GetWithdrawalsHistory(ctx context.Context, _ currency.Code, _ asset.Item) ([]exchange.WithdrawalHistory, error)
- func (e *EXMO) ModifyOrder(_ context.Context, _ *order.Modify) (*order.ModifyResponse, error)
- func (e *EXMO) SendAuthenticatedHTTPRequest(ctx context.Context, epath exchange.URL, method, endpoint string, ...) error
- func (e *EXMO) SendHTTPRequest(ctx context.Context, endpoint exchange.URL, path string, result interface{}) error
- func (e *EXMO) SetDefaults()
- func (e *EXMO) Setup(exch *config.Exchange) error
- func (e *EXMO) SubmitOrder(ctx context.Context, s *order.Submit) (*order.SubmitResponse, error)
- func (e *EXMO) UpdateAccountInfo(ctx context.Context, assetType asset.Item) (account.Holdings, error)
- func (e *EXMO) UpdateOrderExecutionLimits(_ context.Context, _ asset.Item) error
- func (e *EXMO) UpdateOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (e *EXMO) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item) (*ticker.Price, error)
- func (e *EXMO) UpdateTickers(ctx context.Context, a asset.Item) error
- func (e *EXMO) UpdateTradablePairs(ctx context.Context, forceUpdate bool) error
- func (e *EXMO) ValidateAPICredentials(ctx context.Context, assetType asset.Item) error
- func (e *EXMO) WithdrawCryptocurrency(ctx context.Context, currency, address, invoice, transport string, ...) (int64, error)
- func (e *EXMO) WithdrawCryptocurrencyFunds(ctx context.Context, withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (e *EXMO) WithdrawFiatFunds(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (e *EXMO) WithdrawFiatFundsToInternationalBank(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)
- type ExcodeCreate
- type ExcodeLoad
- type OpenOrders
- type OrderTrades
- type Orderbook
- type PairSettings
- type RequiredAmount
- type Ticker
- type Trades
- type UserInfo
- type UserTrades
- type WalletHistory
Constants ¶
This section is empty.
Variables ¶
var WithdrawalFees = map[currency.Code]float64{ currency.BTC: 0.0005, currency.LTC: 0.01, currency.DOGE: 1, currency.DASH: 0.01, currency.ETH: 0.01, currency.WAVES: 0.001, currency.ZEC: 0.001, currency.USDT: 5, currency.XMR: 0.05, currency.XRP: 0.02, currency.KICK: 50, currency.ETC: 0.01, currency.BCH: 0.001, currency.BTG: 0.001, currency.HBZ: 65, currency.BTCZ: 5, currency.DXT: 20, currency.STQ: 100, currency.XLM: 0.001, currency.OMG: 0.5, currency.TRX: 1, currency.ADA: 1, currency.INK: 50, currency.ZRX: 1, currency.GNT: 1, }
WithdrawalFees the large list of predefined withdrawal fees Prone to change
Functions ¶
This section is empty.
Types ¶
type AuthResponse ¶
AuthResponse stores the auth response
type CancelledOrder ¶
type CancelledOrder struct { Date int64 `json:"date"` OrderID int64 `json:"order_id,string"` Type string `json:"type"` Pair string `json:"pair"` Price float64 `json:"price,string"` Quantity float64 `json:"quantity,string"` Amount float64 `json:"amount,string"` }
CancelledOrder stores cancelled order data
type CryptoPaymentProvider ¶
type CryptoPaymentProvider struct { Type string `json:"type"` Name string `json:"name"` CurrencyName string `json:"currency_name"` Min float64 `json:"min,string"` Max float64 `json:"max,string"` Enabled bool `json:"enabled"` Comment string `json:"comment"` CommissionDescription string `json:"commission_desc"` CurrencyConfirmations uint16 `json:"currency_confirmations"` }
CryptoPaymentProvider stores the cryptocurrency transfer settings
type EXMO ¶
EXMO exchange struct
func (*EXMO) CancelAllOrders ¶
func (e *EXMO) CancelAllOrders(ctx context.Context, _ *order.Cancel) (order.CancelAllResponse, error)
CancelAllOrders cancels all orders associated with a currency pair
func (*EXMO) CancelBatchOrders ¶
func (e *EXMO) CancelBatchOrders(_ context.Context, _ []order.Cancel) (*order.CancelBatchResponse, error)
CancelBatchOrders cancels an orders by their corresponding ID numbers
func (*EXMO) CancelExistingOrder ¶
CancelExistingOrder cancels an order by the orderID
func (*EXMO) CancelOrder ¶
CancelOrder cancels an order by its corresponding ID number
func (*EXMO) CreateOrder ¶
func (e *EXMO) CreateOrder(ctx context.Context, pair, orderType string, price, amount float64) (int64, error)
CreateOrder creates an order Params: pair, quantity, price and type Type can be buy, sell, market_buy, market_sell, market_buy_total and market_sell_total
func (*EXMO) ExcodeCreate ¶
func (e *EXMO) ExcodeCreate(ctx context.Context, currency string, amount float64) (ExcodeCreate, error)
ExcodeCreate creates an EXMO coupon
func (*EXMO) ExcodeLoad ¶
ExcodeLoad loads an EXMO coupon
func (*EXMO) FetchAccountInfo ¶
func (e *EXMO) FetchAccountInfo(ctx context.Context, assetType asset.Item) (account.Holdings, error)
FetchAccountInfo retrieves balances for all enabled currencies
func (*EXMO) FetchOrderbook ¶
func (e *EXMO) FetchOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
FetchOrderbook returns the orderbook for a currency pair
func (*EXMO) FetchTicker ¶
func (e *EXMO) FetchTicker(ctx context.Context, p currency.Pair, assetType asset.Item) (*ticker.Price, error)
FetchTicker returns the ticker for a currency pair
func (*EXMO) FetchTradablePairs ¶
FetchTradablePairs returns a list of the exchanges tradable pairs
func (*EXMO) GetAccountFundingHistory ¶
GetAccountFundingHistory returns funding history, deposits and withdrawals
func (*EXMO) GetActiveOrders ¶
func (e *EXMO) GetActiveOrders(ctx context.Context, req *order.MultiOrderRequest) (order.FilteredOrders, error)
GetActiveOrders retrieves any orders that are active/open
func (*EXMO) GetAvailableTransferChains ¶
func (e *EXMO) GetAvailableTransferChains(ctx context.Context, cryptocurrency currency.Code) ([]string, error)
GetAvailableTransferChains returns the available transfer blockchains for the specific cryptocurrency
func (*EXMO) GetCancelledOrders ¶
func (e *EXMO) GetCancelledOrders(ctx context.Context, offset, limit string) ([]CancelledOrder, error)
GetCancelledOrders returns a list of cancelled orders
func (*EXMO) GetCryptoDepositAddress ¶
GetCryptoDepositAddress returns a list of addresses for cryptocurrency deposits
func (*EXMO) GetCryptoPaymentProvidersList ¶
func (e *EXMO) GetCryptoPaymentProvidersList(ctx context.Context) (map[string][]CryptoPaymentProvider, error)
GetCryptoPaymentProvidersList returns a map of all the supported cryptocurrency transfer settings
func (*EXMO) GetCurrency ¶
GetCurrency returns a list of currencies
func (*EXMO) GetCurrencyTradeURL ¶
func (e *EXMO) 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 (*EXMO) GetDepositAddress ¶
func (e *EXMO) GetDepositAddress(ctx context.Context, cryptocurrency currency.Code, _, chain string) (*deposit.Address, error)
GetDepositAddress returns a deposit address for a specified currency
func (*EXMO) GetFee ¶
func (e *EXMO) GetFee(feeBuilder *exchange.FeeBuilder) (float64, error)
GetFee returns an estimate of fee based on type of transaction
func (*EXMO) GetFeeByType ¶
GetFeeByType returns an estimate of fee based on type of transaction
func (*EXMO) GetFuturesContractDetails ¶
GetFuturesContractDetails returns all contracts from the exchange by asset type
func (*EXMO) GetHistoricCandles ¶
func (e *EXMO) GetHistoricCandles(_ context.Context, _ currency.Pair, _ asset.Item, _ kline.Interval, _, _ time.Time) (*kline.Item, error)
GetHistoricCandles returns candles between a time period for a set time interval
func (*EXMO) GetHistoricCandlesExtended ¶
func (e *EXMO) GetHistoricCandlesExtended(_ context.Context, _ currency.Pair, _ asset.Item, _ kline.Interval, _, _ time.Time) (*kline.Item, error)
GetHistoricCandlesExtended returns candles between a time period for a set time interval
func (*EXMO) GetHistoricTrades ¶
func (e *EXMO) GetHistoricTrades(_ context.Context, _ currency.Pair, _ asset.Item, _, _ time.Time) ([]trade.Data, error)
GetHistoricTrades returns historic trade data within the timeframe provided
func (*EXMO) GetLatestFundingRates ¶
func (e *EXMO) GetLatestFundingRates(context.Context, *fundingrate.LatestRateRequest) ([]fundingrate.LatestRateResponse, error)
GetLatestFundingRates returns the latest funding rates data
func (*EXMO) GetOpenOrders ¶
GetOpenOrders returns the users open orders
func (*EXMO) GetOrderHistory ¶
func (e *EXMO) GetOrderHistory(ctx context.Context, req *order.MultiOrderRequest) (order.FilteredOrders, error)
GetOrderHistory retrieves account order information Can Limit response to specific order status
func (*EXMO) GetOrderInfo ¶
func (e *EXMO) GetOrderInfo(_ context.Context, _ string, _ currency.Pair, _ asset.Item) (*order.Detail, error)
GetOrderInfo returns order information based on order ID
func (*EXMO) GetOrderTrades ¶
GetOrderTrades returns a history of order trade details for the specific orderID
func (*EXMO) GetOrderbook ¶
GetOrderbook returns the orderbook for a symbol or symbols
func (*EXMO) GetPairSettings ¶
GetPairSettings returns the pair settings for a symbol or symbols
func (*EXMO) GetRecentTrades ¶
func (e *EXMO) 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 (*EXMO) GetRequiredAmount ¶
func (e *EXMO) GetRequiredAmount(ctx context.Context, pair string, amount float64) (RequiredAmount, error)
GetRequiredAmount calculates the sum of buying a certain amount of currency for the particular currency pair
func (*EXMO) GetServerTime ¶
GetServerTime returns the current exchange server time.
func (*EXMO) GetUserInfo ¶
GetUserInfo returns the user info
func (*EXMO) GetUserTrades ¶
func (e *EXMO) GetUserTrades(ctx context.Context, pair, offset, limit string) (map[string][]UserTrades, error)
GetUserTrades returns the user trades
func (*EXMO) GetWalletHistory ¶
GetWalletHistory returns the users deposit/withdrawal history
func (*EXMO) GetWithdrawTXID ¶
GetWithdrawTXID gets the result of a withdrawal request
func (*EXMO) GetWithdrawalsHistory ¶
func (e *EXMO) GetWithdrawalsHistory(ctx context.Context, _ currency.Code, _ asset.Item) ([]exchange.WithdrawalHistory, error)
GetWithdrawalsHistory returns previous withdrawals data
func (*EXMO) ModifyOrder ¶
ModifyOrder will allow of changing orderbook placement and limit to market conversion
func (*EXMO) SendAuthenticatedHTTPRequest ¶
func (e *EXMO) SendAuthenticatedHTTPRequest(ctx context.Context, epath exchange.URL, method, endpoint string, vals url.Values, result interface{}) error
SendAuthenticatedHTTPRequest sends an authenticated HTTP request
func (*EXMO) SendHTTPRequest ¶
func (e *EXMO) SendHTTPRequest(ctx context.Context, endpoint exchange.URL, path string, result interface{}) error
SendHTTPRequest sends an unauthenticated HTTP request
func (*EXMO) SetDefaults ¶
func (e *EXMO) SetDefaults()
SetDefaults sets the basic defaults for exmo
func (*EXMO) SubmitOrder ¶
SubmitOrder submits a new order
func (*EXMO) UpdateAccountInfo ¶
func (e *EXMO) UpdateAccountInfo(ctx context.Context, assetType asset.Item) (account.Holdings, error)
UpdateAccountInfo retrieves balances for all enabled currencies for the Exmo exchange
func (*EXMO) UpdateOrderExecutionLimits ¶
UpdateOrderExecutionLimits updates order execution limits
func (*EXMO) UpdateOrderbook ¶
func (e *EXMO) UpdateOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
UpdateOrderbook updates and returns the orderbook for a currency pair
func (*EXMO) UpdateTicker ¶
func (e *EXMO) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item) (*ticker.Price, error)
UpdateTicker updates and returns the ticker for a currency pair
func (*EXMO) UpdateTickers ¶
UpdateTickers updates the ticker for all currency pairs of a given asset type
func (*EXMO) UpdateTradablePairs ¶
UpdateTradablePairs updates the exchanges available pairs and stores them in the exchanges config
func (*EXMO) ValidateAPICredentials ¶
ValidateAPICredentials validates current credentials used for wrapper functionality
func (*EXMO) WithdrawCryptocurrency ¶
func (e *EXMO) WithdrawCryptocurrency(ctx context.Context, currency, address, invoice, transport string, amount float64) (int64, error)
WithdrawCryptocurrency withdraws a cryptocurrency from the exchange to the desired address NOTE: This API function is available only after request to their tech support team
func (*EXMO) WithdrawCryptocurrencyFunds ¶
func (e *EXMO) WithdrawCryptocurrencyFunds(ctx context.Context, withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawCryptocurrencyFunds returns a withdrawal ID when a withdrawal is submitted
func (*EXMO) WithdrawFiatFunds ¶
func (e *EXMO) WithdrawFiatFunds(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawFiatFunds returns a withdrawal ID when a withdrawal is submitted
func (*EXMO) WithdrawFiatFundsToInternationalBank ¶
func (e *EXMO) WithdrawFiatFundsToInternationalBank(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawFiatFundsToInternationalBank returns a withdrawal ID when a withdrawal is submitted
type ExcodeCreate ¶
type ExcodeCreate struct { TaskID int64 `json:"task_id"` Code string `json:"code"` Amount float64 `json:"amount,string"` Currency string `json:"currency"` Balances map[string]string `json:"balances"` }
ExcodeCreate stores the excode create coupon info
type ExcodeLoad ¶
type ExcodeLoad struct { TaskID int64 `json:"task_id"` Amount float64 `json:"amount,string"` Currency string `json:"currency"` Balances map[string]string `json:"balances"` }
ExcodeLoad stores the excode load coupon info
type OpenOrders ¶
type OpenOrders struct { OrderID int64 `json:"order_id,string"` Created int64 `json:"created,string"` Type string `json:"type"` Pair string `json:"pair"` Price float64 `json:"price,string"` Quantity float64 `json:"quantity,string"` Amount float64 `json:"amount,string"` }
OpenOrders stores the order info
type OrderTrades ¶
type OrderTrades struct { Type string `json:"type"` InCurrency string `json:"in_currency"` InAmount float64 `json:"in_amount,string"` OutCurrency string `json:"out_currency"` OutAmount float64 `json:"out_amount,string"` Trades []UserTrades `json:"trades"` }
OrderTrades stores order trade information
type Orderbook ¶
type Orderbook struct { AskQuantity float64 `json:"ask_quantity,string"` AskAmount float64 `json:"ask_amount,string"` AskTop float64 `json:"ask_top,string"` BidQuantity float64 `json:"bid_quantity,string"` BidTop float64 `json:"bid_top,string"` Ask [][]string `json:"ask"` Bid [][]string `json:"bid"` }
Orderbook holds the orderbook data
type PairSettings ¶
type PairSettings struct { MinQuantity float64 `json:"min_quantity,string"` MaxQuantity float64 `json:"max_quantity,string"` MinPrice float64 `json:"min_price,string"` MaxPrice float64 `json:"max_price,string"` MaxAmount float64 `json:"max_amount,string"` MinAmount float64 `json:"min_amount,string"` }
PairSettings holds the pair settings
type RequiredAmount ¶
type RequiredAmount struct { Quantity float64 `json:"quantity,string"` Amount float64 `json:"amount,string"` AvgPrice float64 `json:"avg_price,string"` }
RequiredAmount stores the calculation for buying a certain amount of currency for a particular currency
type Ticker ¶
type Ticker struct { Buy float64 `json:"buy_price,string"` Sell float64 `json:"sell_price,string"` Last float64 `json:"last_trade,string"` High float64 `json:"high,string"` Low float64 `json:"low,string"` Average float64 `json:"average,string"` Volume float64 `json:"vol,string"` VolumeCurrent float64 `json:"vol_curr,string"` Updated int64 `json:"updated"` }
Ticker holds the ticker data
type Trades ¶
type Trades struct { TradeID int64 `json:"trade_id"` Type string `json:"type"` Quantity float64 `json:"quantity,string"` Price float64 `json:"price,string"` Amount float64 `json:"amount,string"` Date int64 `json:"date"` Pair string `json:"pair"` }
Trades holds trade data
type UserInfo ¶
type UserInfo struct { AuthResponse UID int `json:"uid"` ServerDate int `json:"server_date"` Balances map[string]string `json:"balances"` Reserved map[string]string `json:"reserved"` }
UserInfo stores the user info
type UserTrades ¶
type UserTrades struct { TradeID int64 `json:"trade_id"` Date int64 `json:"date"` Type string `json:"type"` Pair string `json:"pair"` OrderID int64 `json:"order_id"` Quantity float64 `json:"quantity"` Price float64 `json:"price"` Amount float64 `json:"amount"` }
UserTrades stores the users trade info
type WalletHistory ¶
type WalletHistory struct { Begin int64 `json:"begin,string"` End int64 `json:"end,string"` History []struct { Timestamp int64 `json:"dt"` Type string `json:"type"` Currency string `json:"curr"` Status string `json:"status"` Provider string `json:"provider"` Amount float64 `json:"amount,string"` Account string `json:"account"` TXID string `json:"txid"` } }
WalletHistory stores the users wallet history