Documentation ¶
Index ¶
- type AccountBalance
- type BankAccount
- type Bitflyer
- func (b *Bitflyer) AuthenticateWebsocket() error
- func (b *Bitflyer) CancelAllExistingOrders()
- func (b *Bitflyer) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, error)
- func (b *Bitflyer) CancelExistingOrder()
- func (b *Bitflyer) CancelOrder(order *order.Cancel) error
- func (b *Bitflyer) CancelParentOrder()
- func (b *Bitflyer) CheckFXString(p currency.Pair) currency.Pair
- func (b *Bitflyer) FetchAccountInfo() (account.Holdings, error)
- func (b *Bitflyer) FetchOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (b *Bitflyer) FetchTicker(p currency.Pair, assetType asset.Item) (*ticker.Price, error)
- func (b *Bitflyer) FetchTradablePairs(assetType asset.Item) ([]string, error)
- func (b *Bitflyer) GetAccountBalance()
- func (b *Bitflyer) GetActiveOrders(getOrdersRequest *order.GetOrdersRequest) ([]order.Detail, error)
- func (b *Bitflyer) GetAddressInfoCA(addressln string) (ChainAnalysisAddress, error)
- func (b *Bitflyer) GetAllOrders()
- func (b *Bitflyer) GetBankAccSummary()
- func (b *Bitflyer) GetBlockCA(blockhash string) (ChainAnalysisBlock, error)
- func (b *Bitflyer) GetBlockbyHeightCA(height int64) (ChainAnalysisBlock, error)
- func (b *Bitflyer) GetCashDeposits()
- func (b *Bitflyer) GetChats(fromDate string) ([]ChatLog, error)
- func (b *Bitflyer) GetCollateralAccounts()
- func (b *Bitflyer) GetCryptoDepositAddress()
- func (b *Bitflyer) GetDefaultConfig() (*config.ExchangeConfig, error)
- func (b *Bitflyer) GetDepositAddress(cryptocurrency currency.Code, accountID string) (string, error)
- func (b *Bitflyer) GetDepositCancellationHistory()
- func (b *Bitflyer) GetDepositHistory()
- func (b *Bitflyer) GetExchangeHistory(p currency.Pair, assetType asset.Item) ([]exchange.TradeHistory, error)
- func (b *Bitflyer) GetExchangeStatus() (string, error)
- func (b *Bitflyer) GetExecutionHistory(symbol string) ([]ExecutedTrade, error)
- func (b *Bitflyer) GetExecutions()
- func (b *Bitflyer) GetFee(feeBuilder *exchange.FeeBuilder) (float64, error)
- func (b *Bitflyer) GetFeeByType(feeBuilder *exchange.FeeBuilder) (float64, error)
- func (b *Bitflyer) GetFundingHistory() ([]exchange.FundHistory, error)
- func (b *Bitflyer) GetHistoricCandles(pair currency.Pair, a asset.Item, start, end time.Time, interval time.Duration) (kline.Item, error)
- func (b *Bitflyer) GetLatestBlockCA() (ChainAnalysisBlock, error)
- func (b *Bitflyer) GetMarginChange()
- func (b *Bitflyer) GetMarginStatus()
- func (b *Bitflyer) GetMarkets() ([]MarketInfo, error)
- func (b *Bitflyer) GetOpenInterest()
- func (b *Bitflyer) GetOrderBook(symbol string) (Orderbook, error)
- func (b *Bitflyer) GetOrderHistory(getOrdersRequest *order.GetOrdersRequest) ([]order.Detail, error)
- func (b *Bitflyer) GetOrderInfo(orderID string) (order.Detail, error)
- func (b *Bitflyer) GetParentOrderDetails()
- func (b *Bitflyer) GetParentOrders()
- func (b *Bitflyer) GetPermissions()
- func (b *Bitflyer) GetSubscriptions() ([]wshandler.WebsocketChannelSubscription, error)
- func (b *Bitflyer) GetTicker(symbol string) (Ticker, error)
- func (b *Bitflyer) GetTradingCommission()
- func (b *Bitflyer) GetTransactionByHashCA(txHash string) (ChainAnalysisTransaction, error)
- func (b *Bitflyer) GetTransactionHistory()
- func (b *Bitflyer) GetWebsocket() (*wshandler.Websocket, error)
- func (b *Bitflyer) ModifyOrder(action *order.Modify) (string, error)
- func (b *Bitflyer) Run()
- func (b *Bitflyer) SendAuthHTTPRequest()
- func (b *Bitflyer) SendHTTPRequest(path string, result interface{}) error
- func (b *Bitflyer) SendOrder()
- func (b *Bitflyer) SendParentOrder()
- func (b *Bitflyer) SetDefaults()
- func (b *Bitflyer) Setup(exch *config.ExchangeConfig) error
- func (b *Bitflyer) Start(wg *sync.WaitGroup)
- func (b *Bitflyer) SubmitOrder(s *order.Submit) (order.SubmitResponse, error)
- func (b *Bitflyer) SubscribeToWebsocketChannels(channels []wshandler.WebsocketChannelSubscription) error
- func (b *Bitflyer) UnsubscribeToWebsocketChannels(channels []wshandler.WebsocketChannelSubscription) error
- func (b *Bitflyer) UpdateAccountInfo() (account.Holdings, error)
- func (b *Bitflyer) UpdateOrderbook(p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (b *Bitflyer) UpdateTicker(p currency.Pair, assetType asset.Item) (*ticker.Price, error)
- func (b *Bitflyer) UpdateTradablePairs(forceUpdate bool) error
- func (b *Bitflyer) ValidateCredentials() error
- func (b *Bitflyer) WithdrawCryptocurrencyFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *Bitflyer) WithdrawFiatFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *Bitflyer) WithdrawFiatFundsToInternationalBank(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *Bitflyer) WithdrawFunds()
- type CancellationHistory
- type CashDeposit
- type ChainAnalysisAddress
- type ChainAnalysisBlock
- type ChainAnalysisTransaction
- type ChatLog
- type CollateralAccounts
- type CollateralHistory
- type DepositAddress
- type DepositHistory
- type ExecutedTrade
- type Executions
- type MarginStatus
- type MarketInfo
- type NewOrder
- type OpenInterest
- type Orderbook
- type Orders
- type ParentOrderDetail
- type ParentOrders
- type RateLimit
- type Ticker
- type TransactionHistory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountBalance ¶
type AccountBalance struct { CurrencyCode string `json:"currency_code"` Amount float64 `json:"amount"` Available float64 `json:"available"` }
AccountBalance holds account balance information
type BankAccount ¶
type BankAccount struct { ID int64 `json:"id"` IsVerified bool `json:"is_verified"` BankName string `json:"bank_name"` BranchName string `json:"branch_name"` AccountType string `json:"account_type"` AccountNumber int `json:"account_number"` AccountName string `json:"account_name"` }
BankAccount holds bank account information
type Bitflyer ¶
Bitflyer is the overarching type across this package
func (*Bitflyer) AuthenticateWebsocket ¶
AuthenticateWebsocket sends an authentication message to the websocket
func (*Bitflyer) CancelAllExistingOrders ¶
func (b *Bitflyer) CancelAllExistingOrders()
CancelAllExistingOrders cancels all orders on the exchange
func (*Bitflyer) CancelAllOrders ¶
CancelAllOrders cancels all orders associated with a currency pair
func (*Bitflyer) CancelExistingOrder ¶
func (b *Bitflyer) CancelExistingOrder()
CancelExistingOrder cancels an order
func (*Bitflyer) CancelOrder ¶
CancelOrder cancels an order by its corresponding ID number
func (*Bitflyer) CancelParentOrder ¶
func (b *Bitflyer) CancelParentOrder()
CancelParentOrder cancels a special order
func (*Bitflyer) CheckFXString ¶
CheckFXString upgrades currency pair if needed
func (*Bitflyer) FetchAccountInfo ¶
FetchAccountInfo retrieves balances for all enabled currencies
func (*Bitflyer) FetchOrderbook ¶
FetchOrderbook returns the orderbook for a currency pair
func (*Bitflyer) FetchTicker ¶
FetchTicker returns the ticker for a currency pair
func (*Bitflyer) FetchTradablePairs ¶
FetchTradablePairs returns a list of the exchanges tradable pairs
func (*Bitflyer) GetAccountBalance ¶
func (b *Bitflyer) GetAccountBalance()
GetAccountBalance returnsthe full list of account funds
func (*Bitflyer) GetActiveOrders ¶
func (b *Bitflyer) GetActiveOrders(getOrdersRequest *order.GetOrdersRequest) ([]order.Detail, error)
GetActiveOrders retrieves any orders that are active/open
func (*Bitflyer) GetAddressInfoCA ¶
func (b *Bitflyer) GetAddressInfoCA(addressln string) (ChainAnalysisAddress, error)
GetAddressInfoCA returns balance information for address by addressln string from bitflyer chain analysis system
func (*Bitflyer) GetAllOrders ¶
func (b *Bitflyer) GetAllOrders()
GetAllOrders returns a list of all orders
func (*Bitflyer) GetBankAccSummary ¶
func (b *Bitflyer) GetBankAccSummary()
GetBankAccSummary returns a full list of bank accounts assoc. with your keys
func (*Bitflyer) GetBlockCA ¶
func (b *Bitflyer) GetBlockCA(blockhash string) (ChainAnalysisBlock, error)
GetBlockCA returns block information by blockhash from bitflyer chain analysis system
func (*Bitflyer) GetBlockbyHeightCA ¶
func (b *Bitflyer) GetBlockbyHeightCA(height int64) (ChainAnalysisBlock, error)
GetBlockbyHeightCA returns the block information by height from bitflyer chain analysis system
func (*Bitflyer) GetCashDeposits ¶
func (b *Bitflyer) GetCashDeposits()
GetCashDeposits returns a full list of cash deposits to the exchange
func (*Bitflyer) GetChats ¶
GetChats returns trollbox chat log Note: returns vary from instant to infinty
func (*Bitflyer) GetCollateralAccounts ¶
func (b *Bitflyer) GetCollateralAccounts()
GetCollateralAccounts returns a full list of collateralised accounts
func (*Bitflyer) GetCryptoDepositAddress ¶
func (b *Bitflyer) GetCryptoDepositAddress()
GetCryptoDepositAddress returns an address for cryptocurrency deposits
func (*Bitflyer) GetDefaultConfig ¶
func (b *Bitflyer) GetDefaultConfig() (*config.ExchangeConfig, error)
GetDefaultConfig returns a default exchange config
func (*Bitflyer) GetDepositAddress ¶
func (b *Bitflyer) GetDepositAddress(cryptocurrency currency.Code, accountID string) (string, error)
GetDepositAddress returns a deposit address for a specified currency
func (*Bitflyer) GetDepositCancellationHistory ¶
func (b *Bitflyer) GetDepositCancellationHistory()
GetDepositCancellationHistory returns the cancellation history of deposits
func (*Bitflyer) GetDepositHistory ¶
func (b *Bitflyer) GetDepositHistory()
GetDepositHistory returns a full history of deposits
func (*Bitflyer) GetExchangeHistory ¶
func (b *Bitflyer) GetExchangeHistory(p currency.Pair, assetType asset.Item) ([]exchange.TradeHistory, error)
GetExchangeHistory returns historic trade data since exchange opening.
func (*Bitflyer) GetExchangeStatus ¶
GetExchangeStatus returns exchange status information
func (*Bitflyer) GetExecutionHistory ¶
func (b *Bitflyer) GetExecutionHistory(symbol string) ([]ExecutedTrade, error)
GetExecutionHistory returns past trades that were executed on the market
func (*Bitflyer) GetExecutions ¶
func (b *Bitflyer) GetExecutions()
GetExecutions returns execution details
func (*Bitflyer) GetFee ¶
func (b *Bitflyer) GetFee(feeBuilder *exchange.FeeBuilder) (float64, error)
GetFee returns an estimate of fee based on type of transaction TODO: Figure out the weird fee structure. Do we use Bitcoin Easy Exchange,Lightning Spot,Bitcoin Market,Lightning FX/Futures ???
func (*Bitflyer) GetFeeByType ¶
func (b *Bitflyer) GetFeeByType(feeBuilder *exchange.FeeBuilder) (float64, error)
GetFeeByType returns an estimate of fee based on the type of transaction
func (*Bitflyer) GetFundingHistory ¶
func (b *Bitflyer) GetFundingHistory() ([]exchange.FundHistory, error)
GetFundingHistory returns funding history, deposits and withdrawals
func (*Bitflyer) GetHistoricCandles ¶
func (b *Bitflyer) GetHistoricCandles(pair currency.Pair, a asset.Item, start, end time.Time, interval time.Duration) (kline.Item, error)
GetHistoricCandles returns candles between a time period for a set time interval
func (*Bitflyer) GetLatestBlockCA ¶
func (b *Bitflyer) GetLatestBlockCA() (ChainAnalysisBlock, error)
GetLatestBlockCA returns the latest block information from bitflyer chain analysis system
func (*Bitflyer) GetMarginChange ¶
func (b *Bitflyer) GetMarginChange()
GetMarginChange returns collateral history
func (*Bitflyer) GetMarginStatus ¶
func (b *Bitflyer) GetMarginStatus()
GetMarginStatus returns current margin status
func (*Bitflyer) GetMarkets ¶
func (b *Bitflyer) GetMarkets() ([]MarketInfo, error)
GetMarkets returns market information
func (*Bitflyer) GetOpenInterest ¶
func (b *Bitflyer) GetOpenInterest()
GetOpenInterest returns a summary of open interest
func (*Bitflyer) GetOrderBook ¶
GetOrderBook returns market orderbook depth
func (*Bitflyer) GetOrderHistory ¶
func (b *Bitflyer) GetOrderHistory(getOrdersRequest *order.GetOrdersRequest) ([]order.Detail, error)
GetOrderHistory retrieves account order information Can Limit response to specific order status
func (*Bitflyer) GetOrderInfo ¶
GetOrderInfo returns information on a current open order
func (*Bitflyer) GetParentOrderDetails ¶
func (b *Bitflyer) GetParentOrderDetails()
GetParentOrderDetails returns a detailing of a parent order
func (*Bitflyer) GetParentOrders ¶
func (b *Bitflyer) GetParentOrders()
GetParentOrders returns a list of all parent orders
func (*Bitflyer) GetPermissions ¶
func (b *Bitflyer) GetPermissions()
GetPermissions returns current permissions for associated with your API keys
func (*Bitflyer) GetSubscriptions ¶
func (b *Bitflyer) GetSubscriptions() ([]wshandler.WebsocketChannelSubscription, error)
GetSubscriptions returns a copied list of subscriptions
func (*Bitflyer) GetTradingCommission ¶
func (b *Bitflyer) GetTradingCommission()
GetTradingCommission returns trading commission
func (*Bitflyer) GetTransactionByHashCA ¶
func (b *Bitflyer) GetTransactionByHashCA(txHash string) (ChainAnalysisTransaction, error)
GetTransactionByHashCA returns transaction information by txHash from bitflyer chain analysis system
func (*Bitflyer) GetTransactionHistory ¶
func (b *Bitflyer) GetTransactionHistory()
GetTransactionHistory returns a full history of transactions
func (*Bitflyer) GetWebsocket ¶
GetWebsocket returns a pointer to the exchange websocket
func (*Bitflyer) ModifyOrder ¶
ModifyOrder will allow of changing orderbook placement and limit to market conversion
func (*Bitflyer) SendAuthHTTPRequest ¶
func (b *Bitflyer) SendAuthHTTPRequest()
SendAuthHTTPRequest sends an authenticated HTTP request Note: HTTP not done due to incorrect account privileges, please open a PR if you have access and update the authenticated requests TODO: Fill out this function once API access is obtained
func (*Bitflyer) SendHTTPRequest ¶
SendHTTPRequest sends an unauthenticated request
func (*Bitflyer) SendParentOrder ¶
func (b *Bitflyer) SendParentOrder()
SendParentOrder sends a special order
func (*Bitflyer) SetDefaults ¶
func (b *Bitflyer) SetDefaults()
SetDefaults sets the basic defaults for Bitflyer
func (*Bitflyer) Setup ¶
func (b *Bitflyer) Setup(exch *config.ExchangeConfig) error
Setup takes in the supplied exchange configuration details and sets params
func (*Bitflyer) SubmitOrder ¶
SubmitOrder submits a new order
func (*Bitflyer) SubscribeToWebsocketChannels ¶
func (b *Bitflyer) SubscribeToWebsocketChannels(channels []wshandler.WebsocketChannelSubscription) error
SubscribeToWebsocketChannels appends to ChannelsToSubscribe which lets websocket.manageSubscriptions handle subscribing
func (*Bitflyer) UnsubscribeToWebsocketChannels ¶
func (b *Bitflyer) UnsubscribeToWebsocketChannels(channels []wshandler.WebsocketChannelSubscription) error
UnsubscribeToWebsocketChannels removes from ChannelsToSubscribe which lets websocket.manageSubscriptions handle unsubscribing
func (*Bitflyer) UpdateAccountInfo ¶
UpdateAccountInfo retrieves balances for all enabled currencies on the Bitflyer exchange
func (*Bitflyer) UpdateOrderbook ¶
UpdateOrderbook updates and returns the orderbook for a currency pair
func (*Bitflyer) UpdateTicker ¶
UpdateTicker updates and returns the ticker for a currency pair
func (*Bitflyer) UpdateTradablePairs ¶
UpdateTradablePairs updates the exchanges available pairs and stores them in the exchanges config
func (*Bitflyer) ValidateCredentials ¶
ValidateCredentials validates current credentials used for wrapper functionality
func (*Bitflyer) WithdrawCryptocurrencyFunds ¶
func (b *Bitflyer) WithdrawCryptocurrencyFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawCryptocurrencyFunds returns a withdrawal ID when a withdrawal is submitted
func (*Bitflyer) WithdrawFiatFunds ¶
func (b *Bitflyer) WithdrawFiatFunds(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawFiatFunds returns a withdrawal ID when a withdrawal is submitted
func (*Bitflyer) WithdrawFiatFundsToInternationalBank ¶
func (b *Bitflyer) WithdrawFiatFundsToInternationalBank(withdrawRequest *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawFiatFundsToInternationalBank returns a withdrawal ID when a withdrawal is submitted
func (*Bitflyer) WithdrawFunds ¶
func (b *Bitflyer) WithdrawFunds()
WithdrawFunds withdraws funds to a certain bank
type CancellationHistory ¶
type CancellationHistory struct { ID int64 `json:"id"` OrderID string `json:"order_id"` CurrencyCode string `json:"currency_code"` Amount float64 `json:"amount"` Status string `json:"status"` EventDate string `json:"event_date"` }
CancellationHistory cancellation history
type CashDeposit ¶
type CashDeposit struct { ID int64 `json:"id"` OrderID string `json:"order_id"` CurrencyCode string `json:"currency_code"` Amount float64 `json:"amount"` Status string `json:"status"` EventDate string `json:"event_date"` }
CashDeposit holds cash deposit information
type ChainAnalysisAddress ¶
type ChainAnalysisAddress struct { Address string `json:"address"` UnconfirmedBalance float64 `json:"unconfirmed_balance"` ConfirmedBalance float64 `json:"confirmed_balance"` }
ChainAnalysisAddress holds address information from the bitcoin network
type ChainAnalysisBlock ¶
type ChainAnalysisBlock struct { BlockHash string `json:"block_hash"` Height int64 `json:"height"` IsMain bool `json:"is_main"` Version float64 `json:"version"` PreviousBlock string `json:"prev_block"` MerkleRoot string `json:"merkle_root"` Timestamp string `json:"timestamp"` Bits int64 `json:"bits"` Nonce int64 `json:"nonce"` TxNum int64 `json:"txnum"` TotalFees float64 `json:"total_fees"` TxHashes []string `json:"tx_hashes"` }
ChainAnalysisBlock holds block information from the bitcoin network
type ChainAnalysisTransaction ¶
type ChainAnalysisTransaction struct { TxHash string `json:"tx_hash"` BlockHeight int64 `json:"block_height"` Confirmations int64 `json:"confirmed"` Fees float64 `json:"fees"` Size int64 `json:"size"` ReceivedDate string `json:"received_date"` Version float64 `json:"version"` LockTime int64 `json:"lock_time"` Inputs []struct { PrevHash string `json:"prev_hash"` PrevIndex int `json:"prev_index"` Value int64 `json:"value"` Script string `json:"script"` Address string `json:"address"` Sequence int64 `json:"sequence"` } `json:"inputs"` Outputs []struct { Value int64 `json:"value"` Script string `json:"script"` Address string `json:"address"` } `json:"outputs"` }
ChainAnalysisTransaction holds transaction data from the bitcoin network
type ChatLog ¶
type ChatLog struct { Nickname string `json:"nickname"` Message string `json:"message"` Date string `json:"date"` }
ChatLog holds chat log information
type CollateralAccounts ¶
type CollateralAccounts struct { CurrencyCode string `json:"currency_code"` Amount float64 `json:"amount"` }
CollateralAccounts holds collateral balances
type CollateralHistory ¶
type CollateralHistory struct { ID int64 `json:"id"` CurrencyCode string `json:"currency_code"` Change float64 `json:"change"` Amount float64 `json:"amount"` Reason string `json:"reason_code"` Date string `json:"date"` }
CollateralHistory holds collateral history data
type DepositAddress ¶
type DepositAddress struct { Type string `json:"type"` CurrencyCode string `json:"currency_code"` Address string `json:"address"` }
DepositAddress hold depositing address information
type DepositHistory ¶
type DepositHistory struct { ID int64 `json:"id"` OrderID int64 `json:"order_id"` CurrencyCode string `json:"currency_code"` Amount float64 `json:"amount"` Address string `json:"address"` TXHash string `json:"tx_hash"` Status string `json:"status"` EventDate string `json:"event_date"` }
DepositHistory holds deposit history information
type ExecutedTrade ¶
type ExecutedTrade struct { ID int64 `json:"id"` Side string `json:"side"` Price float64 `json:"price"` Size float64 `json:"size"` ExecDate string `json:"exec_date"` BuyAcceptedID string `json:"buy_child_order_acceptance_id"` SellAcceptedID string `json:"sell_child_order_acceptance_id"` }
ExecutedTrade holds past trade information
type Executions ¶
type Executions struct { ID int64 `json:"id"` ChildOrderID string `json:"child_order_id"` Side string `json:"side"` Price float64 `json:"price"` Size float64 `json:"size"` Commission float64 `json:"commission"` ExecDate string `json:"exec_date"` ChildOrderAcceptanceID string `json:"child_order_acceptance_id"` }
Executions holds past executed trade details
type MarginStatus ¶
type MarginStatus struct { Collateral float64 `json:"collateral"` OpenPosPNL float64 `json:"open_position_pnl"` RequiredCollateral float64 `json:"require_collateral"` KeepRate float64 `json:"keep_rate"` }
MarginStatus holds margin status information
type MarketInfo ¶
MarketInfo holds market information returned from bitflyer
type NewOrder ¶
type NewOrder struct { ProductCode string `json:"product_code"` ChildOrderType string `json:"child_order_type"` Side string `json:"side"` Price float64 `json:"price"` Size float64 `json:"size"` MinuteToExpire float64 `json:"minute_to_expire"` TimeInForce string `json:"time_in_force"` }
NewOrder to send a new order
type OpenInterest ¶
type OpenInterest struct { ProductCode string `json:"product_code"` Side string `json:"side"` Price float64 `json:"price"` Size float64 `json:"size"` Commission float64 `json:"commission"` SwapPointAccumulate float64 `json:"swap_point_accumulate"` RequiredCollateral float64 `json:"require_collateral"` OpenDate string `json:"open_date"` Leverage float64 `json:"leverage"` PNL float64 `json:"pnl"` }
OpenInterest holds open interest information
type Orderbook ¶
type Orderbook struct { MidPrice float64 `json:"mid_price"` Bids []struct { Price float64 `json:"price"` Size float64 `json:"size"` } `json:"bids"` Asks []struct { Price float64 `json:"price"` Size float64 `json:"size"` } `json:"asks"` }
Orderbook holds orderbook information
type Orders ¶
type Orders struct { ID int64 `json:"id"` ChildOrderID string `json:"child_order_id"` ProductCode string `json:"product_code"` Side string `json:"side"` ChildOrderType string `json:"child_order_type"` Price float64 `json:"price"` AveragePrice float64 `json:"average_price"` Size float64 `json:"size"` ChildOrderState string `json:"child_order_state"` ExpireDate string `json:"expire_date"` ChildOrderDate string `json:"child_order_date"` ChildOrderAcceptanceID string `json:"child_order_acceptance_id"` OutstandingSize float64 `json:"outstanding_size"` CancelSize float64 `json:"cancel_size"` ExecutedSize float64 `json:"executed_size"` TotalCommission float64 `json:"total_commission"` }
Orders holds order full order information
type ParentOrderDetail ¶
type ParentOrderDetail struct { ID int64 `json:"id"` ParentOrderID string `json:"parent_order_id"` OrderMethod string `json:"order_method"` MinutesToExpire float64 `json:"minute_to_expire"` Parameters []struct { ProductCode string `json:"product_code"` ConditionType string `json:"condition_type"` Side string `json:"side"` Price float64 `json:"price"` Size float64 `json:"size"` TriggerPrice float64 `json:"trigger_price"` Offset float64 `json:"offset"` } `json:"parameters"` }
ParentOrderDetail holds detailed information about an order
type ParentOrders ¶
type ParentOrders struct { ID int64 `json:"id"` ParentOrderID string `json:"parent_order_id"` ProductCode string `json:"product_code"` Side string `json:"side"` ParentOrderType string `json:"parent_order_type"` Price float64 `json:"price"` AveragePrice float64 `json:"average_price"` Size float64 `json:"size"` ParentOrderState string `json:"parent_order_state"` ExpireDate string `json:"expire_date"` ParentOrderDate string `json:"parent_order_date"` ParentOrderAcceptanceID string `json:"parent_order_acceptance_id"` OutstandingSize float64 `json:"outstanding_size"` CancelSize float64 `json:"cancel_size"` ExecutedSize float64 `json:"executed_size"` TotalCommission float64 `json:"total_commission"` }
ParentOrders holds order full order information
type RateLimit ¶
type RateLimit struct { Auth *rate.Limiter UnAuth *rate.Limiter // Send a New Order // Submit New Parent Order (Special order) // Cancel All Orders Order *rate.Limiter LowVolume *rate.Limiter }
RateLimit implements the rate.Limiter interface
func SetRateLimit ¶
func SetRateLimit() *RateLimit
SetRateLimit returns the rate limit for the exchange
type Ticker ¶
type Ticker struct { ProductCode string `json:"product_code"` TimeStamp string `json:"timestamp"` TickID int64 `json:"tick_id"` BestBid float64 `json:"best_bid"` BestAsk float64 `json:"best_ask"` BestBidSize float64 `json:"best_bid_size"` BestAskSize float64 `json:"best_ask_size"` TotalBidDepth float64 `json:"total_bid_depth"` TotalAskDepth float64 `json:"total_ask_depth"` Last float64 `json:"ltp"` Volume float64 `json:"volume"` VolumeByProduct float64 `json:"volume_by_product"` }
Ticker holds ticker information
type TransactionHistory ¶
type TransactionHistory struct { ID int64 `json:"id"` OrderID int64 `json:"order_id"` CurrencyCode string `json:"currency_code"` Amount float64 `json:"amount"` Address string `json:"address"` TXHash string `json:"tx_hash"` Fee float64 `json:"fee"` AdditionalFee float64 `json:"additional_fee"` Status string `json:"status"` EventDate string `json:"event_date"` }
TransactionHistory holds prior transaction history data