Documentation ¶
Index ¶
- type AccountBalance
- type BankAccount
- type Bitflyer
- func (b *Bitflyer) CancelAllExistingOrders()
- func (b *Bitflyer) CancelAllOrders(_ context.Context, _ *order.Cancel) (order.CancelAllResponse, error)
- func (b *Bitflyer) CancelBatchOrders(_ context.Context, _ []order.Cancel) (*order.CancelBatchResponse, error)
- func (b *Bitflyer) CancelExistingOrder()
- func (b *Bitflyer) CancelOrder(_ context.Context, _ *order.Cancel) error
- func (b *Bitflyer) CancelParentOrder()
- func (b *Bitflyer) CheckFXString(p currency.Pair) currency.Pair
- func (b *Bitflyer) FetchAccountInfo(ctx context.Context, assetType asset.Item) (account.Holdings, error)
- func (b *Bitflyer) FetchOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (b *Bitflyer) FetchTicker(ctx context.Context, p currency.Pair, assetType asset.Item) (*ticker.Price, error)
- func (b *Bitflyer) FetchTradablePairs(ctx context.Context, a asset.Item) (currency.Pairs, error)
- func (b *Bitflyer) GetAccountBalance()
- func (b *Bitflyer) GetAccountFundingHistory(_ context.Context) ([]exchange.FundingHistory, error)
- func (b *Bitflyer) GetActiveOrders(_ context.Context, _ *order.MultiOrderRequest) (order.FilteredOrders, error)
- func (b *Bitflyer) GetAddressInfoCA(ctx context.Context, addressln string) (ChainAnalysisAddress, error)
- func (b *Bitflyer) GetAllOrders()
- func (b *Bitflyer) GetBankAccSummary()
- func (b *Bitflyer) GetBlockCA(ctx context.Context, blockhash string) (ChainAnalysisBlock, error)
- func (b *Bitflyer) GetBlockbyHeightCA(ctx context.Context, height int64) (ChainAnalysisBlock, error)
- func (b *Bitflyer) GetCashDeposits()
- func (b *Bitflyer) GetChats(ctx context.Context, fromDate string) ([]ChatLog, error)
- func (b *Bitflyer) GetCollateralAccounts()
- func (b *Bitflyer) GetCryptoDepositAddress()
- func (b *Bitflyer) GetCurrencyTradeURL(_ context.Context, a asset.Item, cp currency.Pair) (string, error)
- func (b *Bitflyer) GetDepositAddress(_ context.Context, _ currency.Code, _, _ string) (*deposit.Address, error)
- func (b *Bitflyer) GetDepositCancellationHistory()
- func (b *Bitflyer) GetDepositHistory()
- func (b *Bitflyer) GetExchangeStatus(ctx context.Context) (string, error)
- func (b *Bitflyer) GetExecutionHistory(ctx context.Context, symbol string) ([]ExecutedTrade, error)
- func (b *Bitflyer) GetExecutions()
- func (b *Bitflyer) GetFee(feeBuilder *exchange.FeeBuilder) (float64, error)
- func (b *Bitflyer) GetFeeByType(ctx context.Context, feeBuilder *exchange.FeeBuilder) (float64, error)
- func (b *Bitflyer) GetFuturesContractDetails(context.Context, asset.Item) ([]futures.Contract, error)
- func (b *Bitflyer) GetHistoricCandles(_ context.Context, _ currency.Pair, _ asset.Item, _ kline.Interval, ...) (*kline.Item, error)
- func (b *Bitflyer) GetHistoricCandlesExtended(_ context.Context, _ currency.Pair, _ asset.Item, _ kline.Interval, ...) (*kline.Item, error)
- func (b *Bitflyer) GetHistoricTrades(_ context.Context, _ currency.Pair, _ asset.Item, _, _ time.Time) ([]trade.Data, error)
- func (b *Bitflyer) GetLatestBlockCA(ctx context.Context) (ChainAnalysisBlock, error)
- func (b *Bitflyer) GetLatestFundingRates(context.Context, *fundingrate.LatestRateRequest) ([]fundingrate.LatestRateResponse, error)
- func (b *Bitflyer) GetMarginChange()
- func (b *Bitflyer) GetMarginStatus()
- func (b *Bitflyer) GetMarkets(ctx context.Context) ([]MarketInfo, error)
- func (b *Bitflyer) GetOpenInterestData()
- func (b *Bitflyer) GetOrderBook(ctx context.Context, symbol string) (Orderbook, error)
- func (b *Bitflyer) GetOrderHistory(_ context.Context, _ *order.MultiOrderRequest) (order.FilteredOrders, error)
- func (b *Bitflyer) GetOrderInfo(_ context.Context, _ string, _ currency.Pair, _ asset.Item) (*order.Detail, error)
- func (b *Bitflyer) GetParentOrderDetails()
- func (b *Bitflyer) GetParentOrders()
- func (b *Bitflyer) GetPermissions()
- func (b *Bitflyer) GetRecentTrades(ctx context.Context, p currency.Pair, assetType asset.Item) ([]trade.Data, error)
- func (b *Bitflyer) GetServerTime(_ context.Context, _ asset.Item) (time.Time, error)
- func (b *Bitflyer) GetTicker(ctx context.Context, symbol string) (Ticker, error)
- func (b *Bitflyer) GetTradingCommission()
- func (b *Bitflyer) GetTransactionByHashCA(ctx context.Context, txHash string) (ChainAnalysisTransaction, error)
- func (b *Bitflyer) GetTransactionHistory()
- func (b *Bitflyer) GetWithdrawalsHistory(_ context.Context, _ currency.Code, _ asset.Item) ([]exchange.WithdrawalHistory, error)
- func (b *Bitflyer) ModifyOrder(_ context.Context, _ *order.Modify) (*order.ModifyResponse, error)
- func (b *Bitflyer) SendAuthHTTPRequest()
- func (b *Bitflyer) SendHTTPRequest(ctx context.Context, ep exchange.URL, path string, result interface{}) error
- func (b *Bitflyer) SendOrder()
- func (b *Bitflyer) SendParentOrder()
- func (b *Bitflyer) SetDefaults()
- func (b *Bitflyer) Setup(exch *config.Exchange) error
- func (b *Bitflyer) SubmitOrder(_ context.Context, _ *order.Submit) (*order.SubmitResponse, error)
- func (b *Bitflyer) SubmitOrders(ctx context.Context, ss ...*order.Submit) ([]*order.SubmitResponse, error)
- func (b *Bitflyer) UpdateAccountInfo(_ context.Context, _ asset.Item) (account.Holdings, error)
- func (b *Bitflyer) UpdateOrderExecutionLimits(_ context.Context, _ asset.Item) error
- func (b *Bitflyer) UpdateOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
- func (b *Bitflyer) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item) (*ticker.Price, error)
- func (b *Bitflyer) UpdateTickers(_ context.Context, _ asset.Item) error
- func (b *Bitflyer) UpdateTradablePairs(ctx context.Context, forceUpdate bool) error
- func (b *Bitflyer) ValidateAPICredentials(ctx context.Context, assetType asset.Item) error
- func (b *Bitflyer) WithdrawCryptocurrencyFunds(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *Bitflyer) WithdrawFiatFunds(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)
- func (b *Bitflyer) WithdrawFiatFundsToInternationalBank(_ context.Context, _ *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) CancelAllExistingOrders ¶
func (b *Bitflyer) CancelAllExistingOrders()
CancelAllExistingOrders cancels all orders on the exchange
func (*Bitflyer) CancelAllOrders ¶
func (b *Bitflyer) CancelAllOrders(_ context.Context, _ *order.Cancel) (order.CancelAllResponse, error)
CancelAllOrders cancels all orders associated with a currency pair
func (*Bitflyer) CancelBatchOrders ¶
func (b *Bitflyer) CancelBatchOrders(_ context.Context, _ []order.Cancel) (*order.CancelBatchResponse, error)
CancelBatchOrders cancels an orders by their corresponding ID numbers
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 ¶
func (b *Bitflyer) FetchAccountInfo(ctx context.Context, assetType asset.Item) (account.Holdings, error)
FetchAccountInfo retrieves balances for all enabled currencies
func (*Bitflyer) FetchOrderbook ¶
func (b *Bitflyer) FetchOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
FetchOrderbook returns the orderbook for a currency pair
func (*Bitflyer) FetchTicker ¶
func (b *Bitflyer) FetchTicker(ctx context.Context, p currency.Pair, assetType asset.Item) (*ticker.Price, error)
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) GetAccountFundingHistory ¶
GetAccountFundingHistory returns funding history, deposits and withdrawals
func (*Bitflyer) GetActiveOrders ¶
func (b *Bitflyer) GetActiveOrders(_ context.Context, _ *order.MultiOrderRequest) (order.FilteredOrders, error)
GetActiveOrders retrieves any orders that are active/open
func (*Bitflyer) GetAddressInfoCA ¶
func (b *Bitflyer) GetAddressInfoCA(ctx context.Context, 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 ¶
GetBlockCA returns block information by blockhash from bitflyer chain analysis system
func (*Bitflyer) GetBlockbyHeightCA ¶
func (b *Bitflyer) GetBlockbyHeightCA(ctx context.Context, 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 infinity
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) GetCurrencyTradeURL ¶
func (b *Bitflyer) 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 (*Bitflyer) GetDepositAddress ¶
func (b *Bitflyer) GetDepositAddress(_ context.Context, _ currency.Code, _, _ string) (*deposit.Address, 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) GetExchangeStatus ¶
GetExchangeStatus returns exchange status information
func (*Bitflyer) GetExecutionHistory ¶
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(ctx context.Context, feeBuilder *exchange.FeeBuilder) (float64, error)
GetFeeByType returns an estimate of fee based on the type of transaction
func (*Bitflyer) GetFuturesContractDetails ¶
func (b *Bitflyer) GetFuturesContractDetails(context.Context, asset.Item) ([]futures.Contract, error)
GetFuturesContractDetails returns all contracts from the exchange by asset type
func (*Bitflyer) GetHistoricCandles ¶
func (b *Bitflyer) 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 (*Bitflyer) GetHistoricCandlesExtended ¶
func (b *Bitflyer) 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 (*Bitflyer) GetHistoricTrades ¶
func (b *Bitflyer) GetHistoricTrades(_ context.Context, _ currency.Pair, _ asset.Item, _, _ time.Time) ([]trade.Data, error)
GetHistoricTrades returns historic trade data within the timeframe provided
func (*Bitflyer) GetLatestBlockCA ¶
func (b *Bitflyer) GetLatestBlockCA(ctx context.Context) (ChainAnalysisBlock, error)
GetLatestBlockCA returns the latest block information from bitflyer chain analysis system
func (*Bitflyer) GetLatestFundingRates ¶
func (b *Bitflyer) GetLatestFundingRates(context.Context, *fundingrate.LatestRateRequest) ([]fundingrate.LatestRateResponse, error)
GetLatestFundingRates returns the latest funding rates data
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(ctx context.Context) ([]MarketInfo, error)
GetMarkets returns market information
func (*Bitflyer) GetOpenInterestData ¶
func (b *Bitflyer) GetOpenInterestData()
GetOpenInterestData returns a summary of open interest
func (*Bitflyer) GetOrderBook ¶
GetOrderBook returns market orderbook depth
func (*Bitflyer) GetOrderHistory ¶
func (b *Bitflyer) GetOrderHistory(_ context.Context, _ *order.MultiOrderRequest) (order.FilteredOrders, error)
GetOrderHistory retrieves account order information Can Limit response to specific order status
func (*Bitflyer) GetOrderInfo ¶
func (b *Bitflyer) GetOrderInfo(_ context.Context, _ string, _ currency.Pair, _ asset.Item) (*order.Detail, error)
GetOrderInfo returns order information based on order ID
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) GetRecentTrades ¶
func (b *Bitflyer) GetRecentTrades(ctx context.Context, p currency.Pair, assetType asset.Item) ([]trade.Data, error)
GetRecentTrades returns recent historic trades
func (*Bitflyer) GetServerTime ¶
GetServerTime returns the current exchange server time.
func (*Bitflyer) GetTradingCommission ¶
func (b *Bitflyer) GetTradingCommission()
GetTradingCommission returns trading commission
func (*Bitflyer) GetTransactionByHashCA ¶
func (b *Bitflyer) GetTransactionByHashCA(ctx context.Context, 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) GetWithdrawalsHistory ¶
func (b *Bitflyer) GetWithdrawalsHistory(_ context.Context, _ currency.Code, _ asset.Item) ([]exchange.WithdrawalHistory, error)
GetWithdrawalsHistory returns previous withdrawals data
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 ¶
func (b *Bitflyer) SendHTTPRequest(ctx context.Context, ep exchange.URL, path string, result interface{}) error
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) SubmitOrder ¶
SubmitOrder submits a new order
func (*Bitflyer) SubmitOrders ¶ added in v1.0.7
func (*Bitflyer) UpdateAccountInfo ¶
UpdateAccountInfo retrieves balances for all enabled currencies on the Bitflyer exchange
func (*Bitflyer) UpdateOrderExecutionLimits ¶
UpdateOrderExecutionLimits updates order execution limits
func (*Bitflyer) UpdateOrderbook ¶
func (b *Bitflyer) UpdateOrderbook(ctx context.Context, p currency.Pair, assetType asset.Item) (*orderbook.Base, error)
UpdateOrderbook updates and returns the orderbook for a currency pair
func (*Bitflyer) UpdateTicker ¶
func (b *Bitflyer) UpdateTicker(ctx context.Context, p currency.Pair, a asset.Item) (*ticker.Price, error)
UpdateTicker updates and returns the ticker for a currency pair
func (*Bitflyer) UpdateTickers ¶
UpdateTickers updates the ticker for all currency pairs of a given asset type
func (*Bitflyer) UpdateTradablePairs ¶
UpdateTradablePairs updates the exchanges available pairs and stores them in the exchanges config
func (*Bitflyer) ValidateAPICredentials ¶
ValidateAPICredentials validates current credentials used for wrapper functionality
func (*Bitflyer) WithdrawCryptocurrencyFunds ¶
func (b *Bitflyer) WithdrawCryptocurrencyFunds(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawCryptocurrencyFunds returns a withdrawal ID when a withdrawal is submitted
func (*Bitflyer) WithdrawFiatFunds ¶
func (b *Bitflyer) WithdrawFiatFunds(_ context.Context, _ *withdraw.Request) (*withdraw.ExchangeResponse, error)
WithdrawFiatFunds returns a withdrawal ID when a withdrawal is submitted
func (*Bitflyer) WithdrawFiatFundsToInternationalBank ¶
func (b *Bitflyer) WithdrawFiatFundsToInternationalBank(_ context.Context, _ *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 ¶
type MarketInfo struct { ProductCode string `json:"product_code"` Alias string `json:"alias"` MarketType string `json:"market_type"` }
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