Documentation ¶
Index ¶
- type Account
- type AccountDetail
- type Api
- func (api *Api) AccountDetail() (AccountDetail, error)
- func (api *Api) ActiveOrders() ([]Order, error)
- func (api *Api) AuctionHistory(symbol string, args Args) ([]Auction, error)
- func (api *Api) Balances() ([]FundBalance, error)
- func (api *Api) CancelAll() (CancelResult, error)
- func (api *Api) CancelOrder(orderId string) (Order, error)
- func (api *Api) CancelSession() (CancelResult, error)
- func (api *Api) CurrentAuction(symbol string) (CurrentAuction, error)
- func (api *Api) DepositAddresses(currency string) ([]DepositAddresses, error)
- func (api *Api) Heartbeat() (GenericResponse, error)
- func (api *Api) NewDepositAddress(currency, label string) (NewDepositAddress, error)
- func (api *Api) NewOrder(symbol, clientOrderId string, amount, price float64, side string, ...) (Order, error)
- func (api *Api) OrderBook(symbol string, args Args) (Book, error)
- func (api *Api) OrderStatus(orderId string) (Order, error)
- func (api *Api) PastTrades(symbol string, args Args) ([]PastTrade, error)
- func (api *Api) Symbols() ([]string, error)
- func (api *Api) TickerV1(symbol string) (TickerV1, error)
- func (api *Api) TickerV2(symbol string) (TickerV2, error)
- func (api *Api) TradeVolume() ([][]TradeVolume, error)
- func (api *Api) Trades(symbol string, args Args) ([]Trade, error)
- func (api *Api) Transfers(args Args) ([]Transfer, error)
- func (api *Api) WithdrawFunds(currency, address string, amount float64) (WithdrawFundsResult, error)
- type Args
- type Auction
- type Book
- type BookEntries
- type BookEntry
- type CancelResult
- type CancelResultDetails
- type CurrentAuction
- type DepositAddresses
- type FundBalance
- type GenericResponse
- type NewDepositAddress
- type Order
- type PastTrade
- type TickerV1
- type TickerV1Volume
- type TickerV2
- type Trade
- type TradeVolume
- type Transfer
- type Users
- type WithdrawFundsResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountDetail ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
func (*Api) AuctionHistory ¶
Auction History Args{"since": 50, "limit": 0, "includeIndicative": true}
func (*Api) CancelAll ¶
func (api *Api) CancelAll() (CancelResult, error)
Cancel All This will cancel all outstanding orders created by all sessions owned by this account, including interactive orders placed through the UI. Note that this cancels orders that were not placed using this API key.
func (*Api) CancelSession ¶
func (api *Api) CancelSession() (CancelResult, error)
This will cancel all orders opened by this session. This will have the same effect as heartbeat expiration if "Require Heartbeat" is selected for the session.
func (*Api) CurrentAuction ¶
func (api *Api) CurrentAuction(symbol string) (CurrentAuction, error)
Current Auction
func (*Api) DepositAddresses ¶
func (api *Api) DepositAddresses(currency string) ([]DepositAddresses, error)
Get Deposit Addresseses currency can be bitcoin, ethereum, bitcoincash, litecoin, zcash, filecoin
func (*Api) Heartbeat ¶
func (api *Api) Heartbeat() (GenericResponse, error)
Heartbeat This will prevent a session from timing out and canceling orders if the require heartbeat flag has been set. Note that this is only required if no other private API requests have been made. The arrival of any message resets the heartbeat timer.
func (*Api) NewDepositAddress ¶
func (api *Api) NewDepositAddress(currency, label string) (NewDepositAddress, error)
New Deposit Address currency can be bitcoin, ethereum, bitcoincash, litecoin, zcash, or filecoin
func (*Api) NewOrder ¶
func (api *Api) NewOrder(symbol, clientOrderId string, amount, price float64, side string, options []string) (Order, error)
New Order
func (*Api) PastTrades ¶
Past Trades Args{"limit_trades": 50, "timestamp": "2021-12-01T15:04:01"} limit_trades": 0 -> retrieves all trades
func (*Api) Transfers ¶
Args{"timestamp": "2021-12-01T15:04:01", "limit_transfers": 20,"show_completed_deposit_advances": false}
func (*Api) WithdrawFunds ¶
func (api *Api) WithdrawFunds(currency, address string, amount float64) (WithdrawFundsResult, error)
Withdraw Crypto Funds currency can be btc or eth
type Auction ¶
type Auction struct { Timestampms int64 `json:"timestampms"` TimestampmsT time.Time `json:"timestampmst,omitempty"` AuctionId int64 `json:"auction_id"` Eid int64 `json:"eid"` EventType string `json:"event_type"` AuctionResult string `json:"auction_result"` AuctionPrice float64 `json:"auction_price,string"` AuctionQuantity float64 `json:"auction_quantity,string"` HighestBidPrice float64 `json:"highest_bid_price,string"` LowestAskPrice float64 `json:"lowest_ask_price,string"` CollarPrice float64 `json:"collar_price,string"` }
type Book ¶
type Book struct { Bids BookEntries `json:"bids"` Asks BookEntries `json:"asks"` }
type BookEntries ¶
type BookEntries []BookEntry
type CancelResult ¶
type CancelResult struct { Result string `json:"result"` Details CancelResultDetails `json:"details"` }
type CancelResultDetails ¶
type CurrentAuction ¶
type CurrentAuction struct { ClosedUntil int64 `json:"closed_until_ms,omitempty"` LastAuctionEid int64 `json:"last_auction_eid,omitempty"` LastAuctionPrice float64 `json:"last_auction_price,string,omitempty"` LastAuctionQuantity float64 `json:"last_auction_quantity,string,omitempty"` LastHighestBidPrice float64 `json:"last_highest_bid_price,string,omitempty"` LastLowestAskPrice float64 `json:"last_lowest_ask_price,string,omitempty"` LastCollarPrice float64 `json:"last_collar_price,string,omitempty"` MostRecentIndicativePrice float64 `json:"most_recent_indicative_price,string,omitempty"` MostRecentIndicativeQuantity float64 `json:"most_recent_indicative_quantity,string,omitempty"` MostRecentHighestBidPrice float64 `json:"most_recent_highest_bid_price,string,omitempty"` MostRecentLowestAskPrice float64 `json:"most_recent_lowest_ask_price,string,omitempty"` MostRecentCollarPrice float64 `json:"most_recent_collar_price,string,omitempty"` NextUpdate int64 `json:"next_update_ms,omitempty"` NextUpdateT time.Time `json:"next_update_mst,omitempty"` NextAuction int64 `json:"next_auction_ms"` NextAuctionT time.Time `json:"next_auction_mst,omitempty"` }
type DepositAddresses ¶
type FundBalance ¶
type GenericResponse ¶
type GenericResponse struct {
Result string `json:"result"`
}
type NewDepositAddress ¶
type Order ¶
type Order struct { OrderId string `json:"order_id"` ClientOrderId string `json:"client_order_id"` Symbol string `json:"symbol"` Exchange string `json:"exchange"` Price float64 `json:"price,string"` AvgExecutionPrice float64 `json:"avg_execution_price,string"` Side string `json:"side"` Type string `json:"type"` Options []string `json:"options"` // Timestamp string `json:"timestamp"` Timestampms int64 `json:"timestampms"` TimestampmsT time.Time `json:"timestampmst,omitempty"` IsLive bool `json:"is_live"` IsCancelled bool `json:"is_cancelled"` Reason string `json:"reason"` WasForced bool `json:"was_forced"` ExecutedAmount float64 `json:"executed_amount,string"` RemainingAmount float64 `json:"remaining_amount,string"` OriginalAmount float64 `json:"original_amount,string"` IsHidden bool `json:"is_hidden"` }
type PastTrade ¶
type PastTrade struct { Price float64 `json:"price,string"` Amount float64 `json:"amount,string"` Timestamp int64 `json:"timestamp"` Timestampms int64 `json:"timestampms"` TimestampmsT time.Time `json:"timestampmst,omitempty"` Type string `json:"type"` Aggressor bool `json:"aggressor"` FeeCurrency string `json:"fee_currency"` FeeAmount float64 `json:"fee_amount,string"` TradeId int64 `json:"tid"` OrderId string `json:"order_id"` Client_Order_Id string `json:"client_order_id,omitempty"` Exchange string `json:"exchange"` IsAuctionFill bool `json:"is_auction_fill"` Break string `json:"break,omitempty"` }
type TickerV1 ¶
type TickerV1 struct { Bid float64 `json:"bid,string"` Ask float64 `json:"ask,string"` Last float64 `json:"last,string"` Volume TickerV1Volume `json:"volume"` }
type TickerV1Volume ¶
type Trade ¶
type Trade struct { Timestamp int64 `json:"timestamp"` Timestampms int64 `json:"timestampms"` TimestampmsT time.Time `json:"timestampmst,omitempty"` TradeId int64 `json:"tid"` Price float64 `json:"price,string"` Amount float64 `json:"amount,string"` Exchange string `json:"exchange"` Type string `json:"type"` Broken bool `json:"broken,omitempty"` }
type TradeVolume ¶
type TradeVolume struct { Symbol string `json:"symbol"` BaseCurrency string `json:"base_currency"` NotionalCurrency string `json:"notional_currency"` DataDate string `json:"data_date"` TotalVolumeBase float64 `json:"total_volume_base"` MakeBuySellRatio float64 `json:"maker_buy_sell_ratio"` BuyMakerBase float64 `json:"buy_maker_base"` BuyMakerNotional float64 `json:"buy_maker_notional"` BuyMakerCount float64 `json:"buy_maker_count"` SellMakerBase float64 `json:"sell_maker_base"` SellMakerNotional float64 `json:"sell_maker_notional"` SellMakerCount float64 `json:"sell_maker_count"` BuyTakerBase float64 `json:"buy_taker_base"` BuyTakerNotional float64 `json:"buy_taker_notional"` BuyTakerCount float64 `json:"buy_taker_count"` SellTakerBase float64 `json:"sell_taker_base"` SellTakerNotional float64 `json:"sell_taker_notional"` SellTakerCount float64 `json:"sell_taker_count"` }
type Transfer ¶
type Transfer struct { Type string `json:"type"` Status string `json:"status"` Timestampms int64 `json:"timestampms"` TimestampmsT time.Time `json:"timestampmst,omitempty"` Eid int64 `json:"eid"` AdvancedEid int64 `json:"advanceEid"` Currency string `json:"currency"` Amount float64 `json:"amount,string"` Method string `json:"method,omitempty"` TxHash string `json:"txHash,omitempty"` OutputIdx float64 `json:"outputIdx,omitempty"` Destination string `json:"destination,omitempty"` Purpose string `json:"purpose,omitempty"` }