Documentation ¶
Index ¶
- type ClosePositionOrderType
- type GetRequestError
- type HttpClient
- func (c *HttpClient) V1HourlyTicker() (response TickerResponse, err error)
- func (c *HttpClient) V1OrderBook(group int) (response V1OrderBookResponse, err error)
- func (c *HttpClient) V1Ticker() (response TickerResponse, err error)
- func (c *HttpClient) V2AccountBalances() (response []V2AccountBalancesResponse, err error)
- func (c *HttpClient) V2Balance(currencyPairOrAll string) (response V2BalanceResponse, err error)
- func (c *HttpClient) V2BuyInstantOrder(currencyPair string, amount decimal.Decimal, clOrdId string, ...) (response V2InstantOrderResponse, err error)
- func (c *HttpClient) V2BuyLimitOrder(currencyPair string, price, amount, limitPrice decimal.Decimal, ...) (response V2LimitOrderResponse, err error)
- func (c *HttpClient) V2BuyMarketOrder(currencyPair string, amount decimal.Decimal, clOrdId string, ...) (response V2MarketOrderResponse, err error)
- func (c *HttpClient) V2CancelOrder(orderId int64) (response V2CancelOrderResponse, err error)
- func (c *HttpClient) V2CryptoAddress(currency string) (response V2CryptoAddressResponse, err error)
- func (c *HttpClient) V2CryptoTransactions(includeIous bool) (response V2CryptoTransactionsResponse, err error)
- func (c *HttpClient) V2Currencies() (response []V2CurrenciesResponse, err error)
- func (c *HttpClient) V2DerivativesAdjustCollateralValueForPosition(positionId string, newAmount decimal.Decimal) (response V2DerivativesAdjustCollateralValueForPositionResponse, err error)
- func (c *HttpClient) V2DerivativesClosePosition(positionId string) (response V2DerivativesOpenPositionResponse, err error)
- func (c *HttpClient) V2DerivativesClosePositions(orderType ClosePositionOrderType, marginMode *MarginMode, market *string) (response V2DerivativesOpenPositionsResponse, err error)
- func (c *HttpClient) V2DerivativesCollateralCurrencies() (response []V2DerivativesCollateralCurrenciesResponse, err error)
- func (c *HttpClient) V2DerivativesLeverageSettingsList(marginMode MarginMode, market string) (response []V2DerivativesLeverageSettingsListResponse, err error)
- func (c *HttpClient) V2DerivativesMarginInfo() (response V2DerivativesMarginInfoResponse, err error)
- func (c *HttpClient) V2DerivativesOpenPositions(marketSymbol *string) (response []V2DerivativesOpenPosition, err error)
- func (c *HttpClient) V2DerivativesPositionsHistoryList(marketSymbol *string, sort *Sort, page *int64, perPage *int64) (response []V2DerivativesPositionsHistoryListResponse, err error)
- func (c *HttpClient) V2DerivativesPositionsSettlementTransactionList(marketTransactionId *string, offset *int64, limit *int64, sort *Sort, ...) (response []V2DerivativesPositionsSettlementTransactionListResponse, err error)
- func (c *HttpClient) V2DerivativesUpdateLeverageSettingWithOverride(leverage decimal.Decimal, marginMode MarginMode, market string) (response V2DerivativesUpdateLeverageSettingWithOverrideResponse, err error)
- func (c *HttpClient) V2EurUsd() (response V2EurUsdResponse, err error)
- func (c *HttpClient) V2HourlyTicker(currencyPair string) (response TickerResponse, err error)
- func (c *HttpClient) V2Ohlc(currencyPair string, step, limit int, start, end int64) (response V2OhlcResponse, err error)
- func (c *HttpClient) V2OpenOrders(currencyPairOrAll string) (response []V2OpenOrdersResponse, err error)
- func (c *HttpClient) V2OrderBook(currencyPair string, group int) (response V2OrderBookResponse, err error)
- func (c *HttpClient) V2OrderStatus(orderId int64, clOrdId string, omitTx bool) (response V2OrderStatusResponse, err error)
- func (c *HttpClient) V2SellInstantOrder(currencyPair string, amount decimal.Decimal, clOrdId string, ...) (response V2InstantOrderResponse, err error)
- func (c *HttpClient) V2SellLimitOrder(currencyPair string, price, amount, limitPrice decimal.Decimal, ...) (response V2LimitOrderResponse, err error)
- func (c *HttpClient) V2SellMarketOrder(currencyPair string, amount decimal.Decimal, clOrdId string, ...) (response V2MarketOrderResponse, err error)
- func (c *HttpClient) V2Ticker(currencyPair string) (response TickerResponse, err error)
- func (c *HttpClient) V2TradingFees() (response []V2TradingFeesResponse, err error)
- func (c *HttpClient) V2TradingPairsInfo() (response []V2TradingPairsInfoResponse, err error)
- func (c *HttpClient) V2Transactions(currencyPair string, timeParam string) (response []V2TransactionsResponse, err error)
- func (c *HttpClient) V2UserTransactions(currencyPairOrAll string) (response []V2UserTransactionsResponse, err error)
- func (c *HttpClient) V2WebsocketsToken() (response V2WebsocketsTokenResponse, err error)
- func (c *HttpClient) V2WithdrawalFees() (response []V2WithdrawalFeesResponse, err error)
- func (c *HttpClient) V2WithdrawalRequests(withdrawalId int64, timeDelta string) (response []V2WithdrawalRequestsResponse, err error)
- type HttpOption
- type MarginMode
- type MarketSide
- type MarketType
- type Ohlc
- type OrderBookEntry
- type PaginationWrapper
- type PositionStatus
- type SettlementType
- type Sort
- type StringDatetimeFromMicroseconds
- type StringInt
- type TickerResponse
- type V1OrderBookResponse
- type V2AccountBalancesResponse
- type V2BalanceResponse
- type V2CancelOrderResponse
- type V2CryptoAddressResponse
- type V2CryptoTransactionDepositWithdrawal
- type V2CryptoTransactionIou
- type V2CryptoTransactionsResponse
- type V2CurrenciesResponse
- type V2DerivativesAdjustCollateralValueForPositionRequest
- type V2DerivativesAdjustCollateralValueForPositionResponse
- type V2DerivativesCollateralCurrenciesResponse
- type V2DerivativesLeverageSettingsListResponse
- type V2DerivativesMarginInfoResponse
- type V2DerivativesOpenPosition
- type V2DerivativesOpenPositionRequest
- type V2DerivativesOpenPositionResponse
- type V2DerivativesOpenPositionsRequest
- type V2DerivativesOpenPositionsResponse
- type V2DerivativesPositionsHistoryListResponse
- type V2DerivativesPositionsSettlementTransactionListResponse
- type V2DerivativesUpdateLeverageSettingWithOverrideRequest
- type V2DerivativesUpdateLeverageSettingWithOverrideResponse
- type V2EurUsdResponse
- type V2InstantOrderResponse
- type V2LimitOrderResponse
- type V2MarketOrderResponse
- type V2OhlcResponse
- type V2OpenOrdersResponse
- type V2OrderBookResponse
- type V2OrderStatusResponse
- type V2OrderStatusTransaction
- type V2TradingFees
- type V2TradingFeesResponse
- type V2TradingPairsInfoResponse
- type V2TransactionsResponse
- type V2UserTransactionsResponse
- type V2WebsocketsTokenResponse
- type V2WithdrawalFeesResponse
- type V2WithdrawalRequestsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClosePositionOrderType ¶ added in v0.0.4
type ClosePositionOrderType string
const (
Market ClosePositionOrderType = "MARKET"
)
type GetRequestError ¶
GetRequestError is a custom error type that makes for somewhat nicer logic with non-200 codes returned.
func (*GetRequestError) Error ¶
func (e *GetRequestError) Error() string
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
HttpClient implements the HTTP (REST) API endpoints.
func NewHttpClient ¶
func NewHttpClient(options ...HttpOption) *HttpClient
func (*HttpClient) V1HourlyTicker ¶
func (c *HttpClient) V1HourlyTicker() (response TickerResponse, err error)
func (*HttpClient) V1OrderBook ¶
func (c *HttpClient) V1OrderBook(group int) (response V1OrderBookResponse, err error)
func (*HttpClient) V1Ticker ¶
func (c *HttpClient) V1Ticker() (response TickerResponse, err error)
func (*HttpClient) V2AccountBalances ¶ added in v0.0.3
func (c *HttpClient) V2AccountBalances() (response []V2AccountBalancesResponse, err error)
func (*HttpClient) V2Balance ¶
func (c *HttpClient) V2Balance(currencyPairOrAll string) (response V2BalanceResponse, err error)
POST https://www.bitstamp.net/api/v2/balance/ POST https://www.bitstamp.net/api/v2/balance/{currency_pair}/
func (*HttpClient) V2BuyInstantOrder ¶
func (c *HttpClient) V2BuyInstantOrder(currencyPair string, amount decimal.Decimal, clOrdId string, marginMode *MarginMode, leverage *decimal.Decimal, reduceOnly bool) (response V2InstantOrderResponse, err error)
func (*HttpClient) V2BuyLimitOrder ¶
func (c *HttpClient) V2BuyLimitOrder(currencyPair string, price, amount, limitPrice decimal.Decimal, dailyOrder, iocOrder bool, clOrdId string, marginMode *MarginMode, leverage *decimal.Decimal, reduceOnly bool) (response V2LimitOrderResponse, err error)
func (*HttpClient) V2BuyMarketOrder ¶
func (c *HttpClient) V2BuyMarketOrder(currencyPair string, amount decimal.Decimal, clOrdId string, marginMode *MarginMode, leverage *decimal.Decimal, reduceOnly bool) (response V2MarketOrderResponse, err error)
func (*HttpClient) V2CancelOrder ¶
func (c *HttpClient) V2CancelOrder(orderId int64) (response V2CancelOrderResponse, err error)
func (*HttpClient) V2CryptoAddress ¶ added in v0.0.3
func (c *HttpClient) V2CryptoAddress(currency string) (response V2CryptoAddressResponse, err error)
func (*HttpClient) V2CryptoTransactions ¶ added in v0.0.3
func (c *HttpClient) V2CryptoTransactions(includeIous bool) (response V2CryptoTransactionsResponse, err error)
func (*HttpClient) V2Currencies ¶ added in v0.0.3
func (c *HttpClient) V2Currencies() (response []V2CurrenciesResponse, err error)
func (*HttpClient) V2DerivativesAdjustCollateralValueForPosition ¶ added in v0.0.4
func (c *HttpClient) V2DerivativesAdjustCollateralValueForPosition(positionId string, newAmount decimal.Decimal) (response V2DerivativesAdjustCollateralValueForPositionResponse, err error)
func (*HttpClient) V2DerivativesClosePosition ¶ added in v0.0.4
func (c *HttpClient) V2DerivativesClosePosition(positionId string) (response V2DerivativesOpenPositionResponse, err error)
func (*HttpClient) V2DerivativesClosePositions ¶ added in v0.0.4
func (c *HttpClient) V2DerivativesClosePositions(orderType ClosePositionOrderType, marginMode *MarginMode, market *string) (response V2DerivativesOpenPositionsResponse, err error)
func (*HttpClient) V2DerivativesCollateralCurrencies ¶ added in v0.0.4
func (c *HttpClient) V2DerivativesCollateralCurrencies() (response []V2DerivativesCollateralCurrenciesResponse, err error)
func (*HttpClient) V2DerivativesLeverageSettingsList ¶ added in v0.0.4
func (c *HttpClient) V2DerivativesLeverageSettingsList(marginMode MarginMode, market string) (response []V2DerivativesLeverageSettingsListResponse, err error)
func (*HttpClient) V2DerivativesMarginInfo ¶ added in v0.0.4
func (c *HttpClient) V2DerivativesMarginInfo() (response V2DerivativesMarginInfoResponse, err error)
func (*HttpClient) V2DerivativesOpenPositions ¶ added in v0.0.4
func (c *HttpClient) V2DerivativesOpenPositions(marketSymbol *string) (response []V2DerivativesOpenPosition, err error)
func (*HttpClient) V2DerivativesPositionsHistoryList ¶ added in v0.0.4
func (c *HttpClient) V2DerivativesPositionsHistoryList(marketSymbol *string, sort *Sort, page *int64, perPage *int64) (response []V2DerivativesPositionsHistoryListResponse, err error)
func (*HttpClient) V2DerivativesPositionsSettlementTransactionList ¶ added in v0.0.4
func (c *HttpClient) V2DerivativesPositionsSettlementTransactionList(marketTransactionId *string, offset *int64, limit *int64, sort *Sort, sinceTimestamp *int64, untilTimestamp *int64, sinceId *int64) (response []V2DerivativesPositionsSettlementTransactionListResponse, err error)
func (*HttpClient) V2DerivativesUpdateLeverageSettingWithOverride ¶ added in v0.0.4
func (c *HttpClient) V2DerivativesUpdateLeverageSettingWithOverride(leverage decimal.Decimal, marginMode MarginMode, market string) (response V2DerivativesUpdateLeverageSettingWithOverrideResponse, err error)
func (*HttpClient) V2EurUsd ¶
func (c *HttpClient) V2EurUsd() (response V2EurUsdResponse, err error)
func (*HttpClient) V2HourlyTicker ¶
func (c *HttpClient) V2HourlyTicker(currencyPair string) (response TickerResponse, err error)
GET https://www.bitstamp.net/api/v2/ticker_hour/{currency_pair}/
func (*HttpClient) V2Ohlc ¶
func (c *HttpClient) V2Ohlc(currencyPair string, step, limit int, start, end int64) (response V2OhlcResponse, err error)
GET https://www.bitstamp.net/api/v2/ohlc/{currency_pair}/?step=60&limit=5
- start (Optional): Unix timestamp from when OHLC data will be started.
- end (Optional): Unix timestamp to when OHLC data will be shown. If none from start or end timestamps are posted then endpoint returns OHLC data to current unixtime. If both start and end timestamps are posted, end timestamp will be used.
- step: Timeframe in seconds. Possible options are 60, 180, 300, 900, 1800, 3600, 7200, 14400, 21600, 43200, 86400, 259200
- limit: Limit OHLC results (minimum: 1; maximum: 1000)
func (*HttpClient) V2OpenOrders ¶
func (c *HttpClient) V2OpenOrders(currencyPairOrAll string) (response []V2OpenOrdersResponse, err error)
POST https://www.bitstamp.net/api/v2/open_orders/all/ POST https://www.bitstamp.net/api/v2/open_orders/{currency_pair}
func (*HttpClient) V2OrderBook ¶
func (c *HttpClient) V2OrderBook(currencyPair string, group int) (response V2OrderBookResponse, err error)
GET https://www.bitstamp.net/api/v2/order_book/{currency_pair}?group=1 Possible values are for group parameter - 0 (orders are not grouped at same price) - 1 (orders are grouped at same price - default) - 2 (orders with their order ids are not grouped at same price)
func (*HttpClient) V2OrderStatus ¶
func (c *HttpClient) V2OrderStatus(orderId int64, clOrdId string, omitTx bool) (response V2OrderStatusResponse, err error)
func (*HttpClient) V2SellInstantOrder ¶
func (c *HttpClient) V2SellInstantOrder(currencyPair string, amount decimal.Decimal, clOrdId string, marginMode *MarginMode, leverage *decimal.Decimal, reduceOnly bool) (response V2InstantOrderResponse, err error)
func (*HttpClient) V2SellLimitOrder ¶
func (c *HttpClient) V2SellLimitOrder(currencyPair string, price, amount, limitPrice decimal.Decimal, dailyOrder, iocOrder bool, clOrdId string, marginMode *MarginMode, leverage *decimal.Decimal, reduceOnly bool) (response V2LimitOrderResponse, err error)
func (*HttpClient) V2SellMarketOrder ¶
func (c *HttpClient) V2SellMarketOrder(currencyPair string, amount decimal.Decimal, clOrdId string, marginMode *MarginMode, leverage *decimal.Decimal, reduceOnly bool) (response V2MarketOrderResponse, err error)
func (*HttpClient) V2Ticker ¶
func (c *HttpClient) V2Ticker(currencyPair string) (response TickerResponse, err error)
func (*HttpClient) V2TradingFees ¶ added in v0.0.3
func (c *HttpClient) V2TradingFees() (response []V2TradingFeesResponse, err error)
func (*HttpClient) V2TradingPairsInfo ¶
func (c *HttpClient) V2TradingPairsInfo() (response []V2TradingPairsInfoResponse, err error)
func (*HttpClient) V2Transactions ¶
func (c *HttpClient) V2Transactions(currencyPair string, timeParam string) (response []V2TransactionsResponse, err error)
GET https://www.bitstamp.net/api/v2/transactions/{currency_pair}/?time=day
func (*HttpClient) V2UserTransactions ¶
func (c *HttpClient) V2UserTransactions(currencyPairOrAll string) (response []V2UserTransactionsResponse, err error)
TODO: add arguments!
func (*HttpClient) V2WebsocketsToken ¶ added in v0.0.3
func (c *HttpClient) V2WebsocketsToken() (response V2WebsocketsTokenResponse, err error)
V2WebsocketsToken generates an ephemeral token, which allows user to subscribe to private websocket events. These events include ClientOrderIds (and potentially additional private data)
func (*HttpClient) V2WithdrawalFees ¶ added in v0.0.3
func (c *HttpClient) V2WithdrawalFees() (response []V2WithdrawalFeesResponse, err error)
func (*HttpClient) V2WithdrawalRequests ¶ added in v0.0.3
func (c *HttpClient) V2WithdrawalRequests(withdrawalId int64, timeDelta string) (response []V2WithdrawalRequestsResponse, err error)
type HttpOption ¶
type HttpOption func(*httpClientConfig)
func AutoRoundingEnabled ¶
func AutoRoundingEnabled() HttpOption
func Credentials ¶
func Credentials(apiKey string, apiSecret string) HttpOption
func UrlDomain ¶
func UrlDomain(rawDomain string) HttpOption
type MarginMode ¶ added in v0.0.4
type MarginMode string
const ( Cross MarginMode = "CROSS" Isolated MarginMode = "ISOLATED" )
type MarketSide ¶ added in v0.0.4
type MarketSide string
const ( LONG MarketSide = "LONG" SHORT MarketSide = "SHORT" )
type MarketType ¶ added in v0.0.4
type MarketType string
const ( Spot MarketType = "SPOT" Perpetual MarketType = "PERPETUAL" )
type Ohlc ¶
type Ohlc struct { Open decimal.Decimal `json:"open"` High decimal.Decimal `json:"high"` Low decimal.Decimal `json:"low"` Close decimal.Decimal `json:"close"` Timestamp int64 `json:"timestamp"` Volume decimal.Decimal `json:"volume"` }
func (*Ohlc) UnmarshalJSON ¶
custom deserialization instructions necessary
type OrderBookEntry ¶
func (*OrderBookEntry) UnmarshalJSON ¶
func (obe *OrderBookEntry) UnmarshalJSON(bytes []byte) error
custom deserialization instructions necessary
type PaginationWrapper ¶ added in v0.0.4
type PaginationWrapper struct {
Data interface{} `json:"data"`
}
type PositionStatus ¶ added in v0.0.4
type PositionStatus string
const ( Open PositionStatus = "OPEN" WaitingSettlement PositionStatus = "WAITING_SETTLEMENT" Settled PositionStatus = "SETTLED" Liquidating PositionStatus = "LIQUIDATING" )
type SettlementType ¶ added in v0.0.4
type SettlementType string
const ( Periodic SettlementType = "PERIODIC" Closed SettlementType = "CLOSED" )
type StringDatetimeFromMicroseconds ¶ added in v0.0.4
func (*StringDatetimeFromMicroseconds) UnmarshalJSON ¶ added in v0.0.4
func (st *StringDatetimeFromMicroseconds) UnmarshalJSON(b []byte) error
type StringInt ¶ added in v0.0.4
type StringInt int64
StringInt create a type alias for type int64
func (*StringInt) UnmarshalJSON ¶ added in v0.0.4
UnmarshalJSON create a custom unmarshal for the StringInt / this helps us check the type of our value before unmarshalling it
type TickerResponse ¶
type TickerResponse struct { Ask decimal.Decimal `json:"ask"` Bid decimal.Decimal `json:"bid"` High decimal.Decimal `json:"high"` Last decimal.Decimal `json:"last"` Low decimal.Decimal `json:"low"` Open decimal.Decimal `json:"open"` Timestamp int64 `json:"timestamp"` Volume decimal.Decimal `json:"volume"` Vwap decimal.Decimal `json:"vwap"` }
func (*TickerResponse) UnmarshalJSON ¶
func (t *TickerResponse) UnmarshalJSON(data []byte) error
custom deserialization instructions necessary
type V1OrderBookResponse ¶
type V1OrderBookResponse struct { Timestamp string `json:"timestamp"` // UNIX epoch in UTC in seconds Bids []OrderBookEntry `json:"bids"` Asks []OrderBookEntry `json:"asks"` }
type V2AccountBalancesResponse ¶ added in v0.0.3
type V2BalanceResponse ¶
type V2BalanceResponse struct { // currencies AaveAvailable decimal.Decimal `json:"aave_available"` AaveBalance decimal.Decimal `json:"aave_balance"` AaveReserved decimal.Decimal `json:"aave_reserved"` AaveWithdrawalFee decimal.Decimal `json:"aave_withdrawal_fee"` AlgoAvailable decimal.Decimal `json:"algo_available"` AlgoBalance decimal.Decimal `json:"algo_balance"` AlgoReserved decimal.Decimal `json:"algo_reserved"` AlgoWithdrawalFee decimal.Decimal `json:"algo_withdrawal_fee"` AudioAvailable decimal.Decimal `json:"audio_available"` AudioBalance decimal.Decimal `json:"audio_balance"` AudioReserved decimal.Decimal `json:"audio_reserved"` AudioWithdrawalFee decimal.Decimal `json:"audio_withdrawal_fee"` BatAvailable decimal.Decimal `json:"bat_available"` BatBalance decimal.Decimal `json:"bat_balance"` BatReserved decimal.Decimal `json:"bat_reserved"` BatWithdrawalFee decimal.Decimal `json:"bat_withdrawal_fee"` BchAvailable decimal.Decimal `json:"bch_available"` BchBalance decimal.Decimal `json:"bch_balance"` BchReserved decimal.Decimal `json:"bch_reserved"` BchWithdrawalFee decimal.Decimal `json:"bch_withdrawal_fee"` BtcAvailable decimal.Decimal `json:"btc_available"` BtcBalance decimal.Decimal `json:"btc_balance"` BtcReserved decimal.Decimal `json:"btc_reserved"` BtcWithdrawalFee decimal.Decimal `json:"btc_withdrawal_fee"` CompAvailable decimal.Decimal `json:"comp_available"` CompBalance decimal.Decimal `json:"comp_balance"` CompReserved decimal.Decimal `json:"comp_reserved"` CompWithdrawalFee decimal.Decimal `json:"comp_withdrawal_fee"` CrvAvailable decimal.Decimal `json:"crv_available"` CrvBalance decimal.Decimal `json:"crv_balance"` CrvReserved decimal.Decimal `json:"crv_reserved"` CrvWithdrawalFee decimal.Decimal `json:"crv_withdrawal_fee"` DaiAvailable decimal.Decimal `json:"dai_available"` DaiBalance decimal.Decimal `json:"dai_balance"` DaiReserved decimal.Decimal `json:"dai_reserved"` DaiWithdrawalFee decimal.Decimal `json:"dai_withdrawal_fee"` Eth2Available decimal.Decimal `json:"eth2_available"` Eth2Balance decimal.Decimal `json:"eth2_balance"` Eth2Reserved decimal.Decimal `json:"eth2_reserved"` Eth2rAvailable decimal.Decimal `json:"eth2r_available"` Eth2rBalance decimal.Decimal `json:"eth2r_balance"` Eth2rReserved decimal.Decimal `json:"eth2r_reserved"` EthAvailable decimal.Decimal `json:"eth_available"` EthBalance decimal.Decimal `json:"eth_balance"` EthReserved decimal.Decimal `json:"eth_reserved"` EthWithdrawalFee decimal.Decimal `json:"eth_withdrawal_fee"` EurAvailable decimal.Decimal `json:"eur_available"` EurBalance decimal.Decimal `json:"eur_balance"` EurReserved decimal.Decimal `json:"eur_reserved"` EurWithdrawalFee decimal.Decimal `json:"eur_withdrawal_fee"` GbpAvailable decimal.Decimal `json:"gbp_available"` GbpBalance decimal.Decimal `json:"gbp_balance"` GbpReserved decimal.Decimal `json:"gbp_reserved"` GbpWithdrawalFee decimal.Decimal `json:"gbp_withdrawal_fee"` GrtAvailable decimal.Decimal `json:"grt_available"` GrtBalance decimal.Decimal `json:"grt_balance"` GrtReserved decimal.Decimal `json:"grt_reserved"` GrtWithdrawalFee decimal.Decimal `json:"grt_withdrawal_fee"` GusdAvailable decimal.Decimal `json:"gusd_available"` GusdBalance decimal.Decimal `json:"gusd_balance"` GusdReserved decimal.Decimal `json:"gusd_reserved"` GusdWithdrawalFee decimal.Decimal `json:"gusd_withdrawal_fee"` KncAvailable decimal.Decimal `json:"knc_available"` KncBalance decimal.Decimal `json:"knc_balance"` KncReserved decimal.Decimal `json:"knc_reserved"` KncWithdrawalFee decimal.Decimal `json:"knc_withdrawal_fee"` LinkAvailable decimal.Decimal `json:"link_available"` LinkBalance decimal.Decimal `json:"link_balance"` LinkReserved decimal.Decimal `json:"link_reserved"` LinkWithdrawalFee decimal.Decimal `json:"link_withdrawal_fee"` LtcAvailable decimal.Decimal `json:"ltc_available"` LtcBalance decimal.Decimal `json:"ltc_balance"` LtcReserved decimal.Decimal `json:"ltc_reserved"` LtcWithdrawalFee decimal.Decimal `json:"ltc_withdrawal_fee"` MkrAvailable decimal.Decimal `json:"mkr_available"` MkrBalance decimal.Decimal `json:"mkr_balance"` MkrReserved decimal.Decimal `json:"mkr_reserved"` MkrWithdrawalFee decimal.Decimal `json:"mkr_withdrawal_fee"` OmgAvailable decimal.Decimal `json:"omg_available"` OmgBalance decimal.Decimal `json:"omg_balance"` OmgReserved decimal.Decimal `json:"omg_reserved"` OmgWithdrawalFee decimal.Decimal `json:"omg_withdrawal_fee"` PaxAvailable decimal.Decimal `json:"pax_available"` PaxBalance decimal.Decimal `json:"pax_balance"` PaxReserved decimal.Decimal `json:"pax_reserved"` PaxWithdrawalFee decimal.Decimal `json:"pax_withdrawal_fee"` SnxAvailable decimal.Decimal `json:"snx_available"` SnxBalance decimal.Decimal `json:"snx_balance"` SnxReserved decimal.Decimal `json:"snx_reserved"` SnxWithdrawalFee decimal.Decimal `json:"snx_withdrawal_fee"` UmaAvailable decimal.Decimal `json:"uma_available"` UmaBalance decimal.Decimal `json:"uma_balance"` UmaReserved decimal.Decimal `json:"uma_reserved"` UmaWithdrawalFee decimal.Decimal `json:"uma_withdrawal_fee"` UniAvailable decimal.Decimal `json:"uni_available"` UniBalance decimal.Decimal `json:"uni_balance"` UniReserved decimal.Decimal `json:"uni_reserved"` UniWithdrawalFee decimal.Decimal `json:"uni_withdrawal_fee"` UsdAvailable decimal.Decimal `json:"usd_available"` UsdBalance decimal.Decimal `json:"usd_balance"` UsdReserved decimal.Decimal `json:"usd_reserved"` UsdWithdrawalFee decimal.Decimal `json:"usd_withdrawal_fee"` UsdcAvailable decimal.Decimal `json:"usdc_available"` UsdcBalance decimal.Decimal `json:"usdc_balance"` UsdcReserved decimal.Decimal `json:"usdc_reserved"` UsdcWithdrawalFee decimal.Decimal `json:"usdc_withdrawal_fee"` UsdtAvailable decimal.Decimal `json:"usdt_available"` UsdtBalance decimal.Decimal `json:"usdt_balance"` UsdtReserved decimal.Decimal `json:"usdt_reserved"` UsdtWithdrawalFee decimal.Decimal `json:"usdt_withdrawal_fee"` XlmAvailable decimal.Decimal `json:"xlm_available"` XlmBalance decimal.Decimal `json:"xlm_balance"` XlmReserved decimal.Decimal `json:"xlm_reserved"` XlmWithdrawalFee decimal.Decimal `json:"xlm_withdrawal_fee"` XrpAvailable decimal.Decimal `json:"xrp_available"` XrpBalance decimal.Decimal `json:"xrp_balance"` XrpReserved decimal.Decimal `json:"xrp_reserved"` XrpWithdrawalFee decimal.Decimal `json:"xrp_withdrawal_fee"` YfiAvailable decimal.Decimal `json:"yfi_available"` YfiBalance decimal.Decimal `json:"yfi_balance"` YfiReserved decimal.Decimal `json:"yfi_reserved"` YfiWithdrawalFee decimal.Decimal `json:"yfi_withdrawal_fee"` ZrxAvailable decimal.Decimal `json:"zrx_available"` ZrxBalance decimal.Decimal `json:"zrx_balance"` ZrxReserved decimal.Decimal `json:"zrx_reserved"` ZrxWithdrawalFee decimal.Decimal `json:"zrx_withdrawal_fee"` // pairs AavebtcFee decimal.Decimal `json:"aavebtc_fee"` AaveeurFee decimal.Decimal `json:"aaveeur_fee"` AaveusdFee decimal.Decimal `json:"aaveusd_fee"` AlgobtcFee decimal.Decimal `json:"algobtc_fee"` AlgoeurFee decimal.Decimal `json:"algoeur_fee"` AlgousdFee decimal.Decimal `json:"algousd_fee"` AudiobtcFee decimal.Decimal `json:"audiobtc_fee"` AudioeurFee decimal.Decimal `json:"audioeur_fee"` AudiousdFee decimal.Decimal `json:"audiousd_fee"` BatbtcFee decimal.Decimal `json:"batbtc_fee"` BateurFee decimal.Decimal `json:"bateur_fee"` BatusdFee decimal.Decimal `json:"batusd_fee"` BchbtcFee decimal.Decimal `json:"bchbtc_fee"` BcheurFee decimal.Decimal `json:"bcheur_fee"` BchgbpFee decimal.Decimal `json:"bchgbp_fee"` BchusdFee decimal.Decimal `json:"bchusd_fee"` BtceurFee decimal.Decimal `json:"btceur_fee"` BtcgbpFee decimal.Decimal `json:"btcgbp_fee"` BtcpaxFee decimal.Decimal `json:"btcpax_fee"` BtcusdFee decimal.Decimal `json:"btcusd_fee"` BtcusdcFee decimal.Decimal `json:"btcusdc_fee"` BtcusdtFee decimal.Decimal `json:"btcusdt_fee"` CompbtcFee decimal.Decimal `json:"compbtc_fee"` CompeurFee decimal.Decimal `json:"compeur_fee"` CompusdFee decimal.Decimal `json:"compusd_fee"` CrvbtcFee decimal.Decimal `json:"crvbtc_fee"` CrveurFee decimal.Decimal `json:"crveur_fee"` CrvusdFee decimal.Decimal `json:"crvusd_fee"` DaiusdFee decimal.Decimal `json:"daiusd_fee"` Eth2ethFee decimal.Decimal `json:"eth2eth_fee"` EthbtcFee decimal.Decimal `json:"ethbtc_fee"` EtheurFee decimal.Decimal `json:"etheur_fee"` EthgbpFee decimal.Decimal `json:"ethgbp_fee"` EthpaxFee decimal.Decimal `json:"ethpax_fee"` EthusdFee decimal.Decimal `json:"ethusd_fee"` EthusdcFee decimal.Decimal `json:"ethusdc_fee"` EthusdtFee decimal.Decimal `json:"ethusdt_fee"` EurusdFee decimal.Decimal `json:"eurusd_fee"` GbpeurFee decimal.Decimal `json:"gbpeur_fee"` GbpusdFee decimal.Decimal `json:"gbpusd_fee"` GusdusdFee decimal.Decimal `json:"gusdusd_fee"` KncbtcFee decimal.Decimal `json:"kncbtc_fee"` KnceurFee decimal.Decimal `json:"knceur_fee"` KncusdFee decimal.Decimal `json:"kncusd_fee"` LinkbtcFee decimal.Decimal `json:"linkbtc_fee"` LinkethFee decimal.Decimal `json:"linketh_fee"` LinkeurFee decimal.Decimal `json:"linkeur_fee"` LinkgbpFee decimal.Decimal `json:"linkgbp_fee"` LinkusdFee decimal.Decimal `json:"linkusd_fee"` LtcbtcFee decimal.Decimal `json:"ltcbtc_fee"` LtceurFee decimal.Decimal `json:"ltceur_fee"` LtcgbpFee decimal.Decimal `json:"ltcgbp_fee"` LtcusdFee decimal.Decimal `json:"ltcusd_fee"` MkrbtcFee decimal.Decimal `json:"mkrbtc_fee"` MkreurFee decimal.Decimal `json:"mkreur_fee"` MkrusdFee decimal.Decimal `json:"mkrusd_fee"` OmgbtcFee decimal.Decimal `json:"omgbtc_fee"` OmgeurFee decimal.Decimal `json:"omgeur_fee"` OmggbpFee decimal.Decimal `json:"omggbp_fee"` OmgusdFee decimal.Decimal `json:"omgusd_fee"` PaxeurFee decimal.Decimal `json:"paxeur_fee"` PaxgbpFee decimal.Decimal `json:"paxgbp_fee"` PaxusdFee decimal.Decimal `json:"paxusd_fee"` SnxbtcFee decimal.Decimal `json:"snxbtc_fee"` SnxeurFee decimal.Decimal `json:"snxeur_fee"` SnxusdFee decimal.Decimal `json:"snxusd_fee"` UmabtcFee decimal.Decimal `json:"umabtc_fee"` UmaeurFee decimal.Decimal `json:"umaeur_fee"` UmausdFee decimal.Decimal `json:"umausd_fee"` UnibtcFee decimal.Decimal `json:"unibtc_fee"` UnieurFee decimal.Decimal `json:"unieur_fee"` UniusdFee decimal.Decimal `json:"uniusd_fee"` UsdceurFee decimal.Decimal `json:"usdceur_fee"` UsdcusdFee decimal.Decimal `json:"usdcusd_fee"` UsdcusdtFee decimal.Decimal `json:"usdcusdt_fee"` UsdteurFee decimal.Decimal `json:"usdteur_fee"` UsdtusdFee decimal.Decimal `json:"usdtusd_fee"` XlmbtcFee decimal.Decimal `json:"xlmbtc_fee"` XlmeurFee decimal.Decimal `json:"xlmeur_fee"` XlmgbpFee decimal.Decimal `json:"xlmgbp_fee"` XlmusdFee decimal.Decimal `json:"xlmusd_fee"` XrpbtcFee decimal.Decimal `json:"xrpbtc_fee"` XrpeurFee decimal.Decimal `json:"xrpeur_fee"` XrpgbpFee decimal.Decimal `json:"xrpgbp_fee"` XrppaxFee decimal.Decimal `json:"xrppax_fee"` XrpusdFee decimal.Decimal `json:"xrpusd_fee"` XrpusdtFee decimal.Decimal `json:"xrpusdt_fee"` YfibtcFee decimal.Decimal `json:"yfibtc_fee"` YfieurFee decimal.Decimal `json:"yfieur_fee"` YfiusdFee decimal.Decimal `json:"yfiusd_fee"` ZrxbtcFee decimal.Decimal `json:"zrxbtc_fee"` ZrxeurFee decimal.Decimal `json:"zrxeur_fee"` ZrxusdFee decimal.Decimal `json:"zrxusd_fee"` // fee Fee decimal.Decimal `json:"fee"` }
type V2CancelOrderResponse ¶
type V2CryptoAddressResponse ¶ added in v0.0.3
type V2CryptoTransactionDepositWithdrawal ¶ added in v0.0.3
type V2CryptoTransactionIou ¶ added in v0.0.3
type V2CryptoTransactionsResponse ¶ added in v0.0.3
type V2CryptoTransactionsResponse struct { Deposits []V2CryptoTransactionDepositWithdrawal `json:"deposits"` Withdrawals []V2CryptoTransactionDepositWithdrawal `json:"withdrawals"` RippleIouTransactions []V2CryptoTransactionIou `json:"ripple_iou_transactions"` Status string `json:"status"` Reason interface{} `json:"reason"` }
type V2CurrenciesResponse ¶ added in v0.0.3
type V2CurrenciesResponse struct { Name string `json:"name"` Currency string `json:"currency"` Type string `json:"type"` Symbol string `json:"symbol"` Decimals string `json:"decimal"` Logo string `json:"logo"` AvailableSupply string `json:"available_supply"` Deposit string `json:"deposit"` Withdrawal string `json:"withdrawal"` }
type V2DerivativesAdjustCollateralValueForPositionRequest ¶ added in v0.0.4
type V2DerivativesAdjustCollateralValueForPositionResponse ¶ added in v0.0.4
type V2DerivativesCollateralCurrenciesResponse ¶ added in v0.0.4
type V2DerivativesLeverageSettingsListResponse ¶ added in v0.0.4
type V2DerivativesMarginInfoResponse ¶ added in v0.0.4
type V2DerivativesMarginInfoResponse struct { AccountMargin decimal.Decimal `json:"account_margin"` AccountMarginAvailable decimal.Decimal `json:"account_margin_available"` AccountMarginReserved decimal.Decimal `json:"account_margin_reserved"` Assets []struct { Asset string `json:"asset"` Available decimal.Decimal `json:"available"` MarginAvailable decimal.Decimal `json:"margin_available"` Reserved decimal.Decimal `json:"reserved"` TotalAmount decimal.Decimal `json:"total_amount"` } `json:"assets"` ImpliedLeverage decimal.Decimal `json:"implied_leverage"` InitialMarginRatio decimal.Decimal `json:"initial_margin_ratio"` MaintenanceMarginRatio decimal.Decimal `json:"maintenance_margin_ratio"` }
type V2DerivativesOpenPosition ¶ added in v0.0.4
type V2DerivativesOpenPosition struct { Id string `json:"id"` Market string `json:"market"` MarketType MarketType `json:"market_type"` MarginMode MarginMode `json:"margin_mode"` SettlementCurrency string `json:"settlement_currency"` EntryPrice decimal.Decimal `json:"entry_price"` PnlPercentage decimal.Decimal `json:"pnl_percentage"` PnlRealized decimal.Decimal `json:"pnl_realized"` PnlSettledSinceInception decimal.Decimal `json:"pnl_settled_since_inception"` Leverage decimal.Decimal `json:"leverage"` Pnl decimal.Decimal `json:"pnl"` Size decimal.Decimal `json:"size"` PnlUnrealized decimal.Decimal `json:"pnl_unrealized"` ImpliedLeverage decimal.Decimal `json:"implied_leverage"` InitialMargin decimal.Decimal `json:"initial_margin"` InitialMarginRatio decimal.Decimal `json:"initial_margin_ratio"` CurrentMargin decimal.Decimal `json:"current_margin"` CollateralReserved decimal.Decimal `json:"collateral_reserved"` MaintenanceMargin decimal.Decimal `json:"maintenance_margin"` MaintenanceMarginRatio decimal.Decimal `json:"maintenance_margin_ratio"` EstimatedLiquidationPrice decimal.Decimal `json:"estimated_liquidation_price"` EstimatedClosingFeeAmount decimal.Decimal `json:"estimated_closing_fee_amount"` MarkPrice decimal.Decimal `json:"mark_price"` CurrentValue decimal.Decimal `json:"current_value"` EntryValue decimal.Decimal `json:"entry_value"` StrikePrice decimal.Decimal `json:"strike_price"` Side MarketSide `json:"side"` }
type V2DerivativesOpenPositionRequest ¶ added in v0.0.4
type V2DerivativesOpenPositionRequest struct {
PositionId string `json:"position_id"`
}
type V2DerivativesOpenPositionResponse ¶ added in v0.0.4
type V2DerivativesOpenPositionResponse struct { Id string `json:"id"` Market string `json:"market"` MarketType MarketType `json:"market_type"` MarginMode MarginMode `json:"margin_mode"` PnlCurrency string `json:"pnl_currency"` EntryPrice decimal.Decimal `json:"entry_price"` PnlPercentage decimal.Decimal `json:"pnl_percentage"` PnlRealized decimal.Decimal `json:"pnl_realized"` PnlSettled decimal.Decimal `json:"pnl_settled"` Leverage decimal.Decimal `json:"leverage"` Pnl decimal.Decimal `json:"pnl"` AmountDelta decimal.Decimal `json:"amount_delta"` TimeOpened StringDatetimeFromMicroseconds `json:"time_opened"` TimeClosed StringDatetimeFromMicroseconds `json:"time_closed"` Status PositionStatus `json:"status"` ExitPrice decimal.Decimal `json:"exit_price"` SettlementPrice decimal.Decimal `json:"settlement_price"` ClosingFeeAmount decimal.Decimal `json:"closing_fee_amount"` }
type V2DerivativesOpenPositionsRequest ¶ added in v0.0.4
type V2DerivativesOpenPositionsRequest struct { MarginMode *MarginMode `json:"margin_mode,omitempty"` Market *string `json:"market,omitempty"` OrderType ClosePositionOrderType `json:"order_type"` }
type V2DerivativesOpenPositionsResponse ¶ added in v0.0.4
type V2DerivativesOpenPositionsResponse struct { Closed []struct { Id string `json:"id"` Market string `json:"market"` MarketType MarketType `json:"market_type"` MarginMode MarginMode `json:"margin_mode"` PnlCurrency decimal.Decimal `json:"pnl_currency"` EntryPrice decimal.Decimal `json:"entry_price"` PnlPercentage decimal.Decimal `json:"pnl_percentage"` PnlRealized decimal.Decimal `json:"pnl_realized"` PnlSettled decimal.Decimal `json:"pnl_settled"` Leverage decimal.Decimal `json:"leverage"` Pnl decimal.Decimal `json:"pnl"` AmountDelta decimal.Decimal `json:"amount_delta"` TimeOpened StringDatetimeFromMicroseconds `json:"time_opened"` TimeClosed StringDatetimeFromMicroseconds `json:"time_closed"` Status PositionStatus `json:"status"` ExitPrice decimal.Decimal `json:"exit_price"` SettlementPrice decimal.Decimal `json:"settlement_price"` ClosingFeeAmount decimal.Decimal `json:"closing_fee_amount"` } `json:"closed"` Failed []struct { Id string `json:"id"` Market string `json:"market"` MarketType MarketType `json:"market_type"` MarginMode MarginMode `json:"margin_mode"` PnlCurrency decimal.Decimal `json:"pnl_currency"` EntryPrice decimal.Decimal `json:"entry_price"` PnlPercentage decimal.Decimal `json:"pnl_percentage"` PnlRealized decimal.Decimal `json:"pnl_realized"` PnlSettled decimal.Decimal `json:"pnl_settled"` Leverage decimal.Decimal `json:"leverage"` Pnl decimal.Decimal `json:"pnl"` AmountDelta decimal.Decimal `json:"amount_delta"` TimeOpened StringDatetimeFromMicroseconds `json:"time_opened"` TimeClosed StringDatetimeFromMicroseconds `json:"time_closed"` Status PositionStatus `json:"status"` ExitPrice decimal.Decimal `json:"exit_price"` SettlementPrice decimal.Decimal `json:"settlement_price"` ClosingFeeAmount decimal.Decimal `json:"closing_fee_amount"` } `json:"failed"` }
type V2DerivativesPositionsHistoryListResponse ¶ added in v0.0.4
type V2DerivativesPositionsHistoryListResponse struct { Id string `json:"id"` Market string `json:"market"` MarketType MarketType `json:"market_type"` MarginMode MarginMode `json:"margin_mode"` PnlCurrency string `json:"pnl_currency"` EntryPrice decimal.Decimal `json:"entry_price"` PnlPercentage decimal.Decimal `json:"pnl_percentage"` PnlRealized decimal.Decimal `json:"pnl_realized"` PnlSettled decimal.Decimal `json:"pnl_settled"` Leverage decimal.Decimal `json:"leverage"` Pnl decimal.Decimal `json:"pnl"` AmountDelta decimal.Decimal `json:"amount_delta"` TimeOpened StringDatetimeFromMicroseconds `json:"time_opened"` TimeClosed StringDatetimeFromMicroseconds `json:"time_closed"` Status PositionStatus `json:"status"` ExitPrice decimal.Decimal `json:"exit_price"` SettlementPrice decimal.Decimal `json:"settlement_price"` }
type V2DerivativesPositionsSettlementTransactionListResponse ¶ added in v0.0.4
type V2DerivativesPositionsSettlementTransactionListResponse struct { TransactionId string `json:"transaction_id"` PositionId string `json:"position_id"` SettlementTime StringDatetimeFromMicroseconds `json:"settlement_time"` SettlementType SettlementType `json:"settlement_type"` SettlementPrice decimal.Decimal `json:"settlement_price"` Market string `json:"market"` MarketType MarketType `json:"market_type"` PnlCurrency string `json:"pnl_currency"` PnlSettled decimal.Decimal `json:"pnl_settled"` PnlComponentPrice decimal.Decimal `json:"pnl_component_price"` PnlComponentFees decimal.Decimal `json:"pnl_component_fees"` PnlComponentFunding decimal.Decimal `json:"pnl_component_funding"` PnlComponentSocializedLoss decimal.Decimal `json:"pnl_component_socialized_loss"` MarginMode MarginMode `json:"margin_mode"` Size decimal.Decimal `json:"size"` StrikePrice decimal.Decimal `json:"strike_price"` }
type V2DerivativesUpdateLeverageSettingWithOverrideRequest ¶ added in v0.0.4
type V2DerivativesUpdateLeverageSettingWithOverrideRequest struct { Leverage decimal.Decimal `json:"leverage"` MarginMode MarginMode `json:"margin_mode"` Market string `json:"market"` }
type V2DerivativesUpdateLeverageSettingWithOverrideResponse ¶ added in v0.0.4
type V2EurUsdResponse ¶
type V2InstantOrderResponse ¶
type V2InstantOrderResponse struct { Id string `json:"id"` Datetime string `json:"datetime"` Type string `json:"type"` Price decimal.Decimal `json:"price"` Amount decimal.Decimal `json:"amount"` Error string `json:"error"` Status string `json:"status"` Reason interface{} `json:"reason"` Leverage *decimal.Decimal `json:"leverage"` MarginMode *MarginMode `json:"margin_mode"` }
type V2LimitOrderResponse ¶
type V2LimitOrderResponse struct { Id string `json:"id"` Datetime string `json:"datetime"` Type string `json:"type"` Price decimal.Decimal `json:"price"` Amount decimal.Decimal `json:"amount"` Status string `json:"status"` Reason interface{} `json:"reason"` Leverage *decimal.Decimal `json:"leverage"` MarginMode *MarginMode `json:"margin_mode"` }
{"status": "error", "reason": {"__all__": ["Price is more than 20% below market price."]}} {"status": "error", "reason": {"__all__": ["You need 158338.86 USD to open that order. You have only 99991.52 USD available. Check your account balance for details."]}}
type V2MarketOrderResponse ¶
type V2MarketOrderResponse struct { Id string `json:"id"` Subtype string `json:"subtype"` Market string `json:"market"` Datetime string `json:"datetime"` Type string `json:"type"` Price decimal.Decimal `json:"price"` Amount decimal.Decimal `json:"amount"` ClientOrderId string `json:"client_order_id"` MarginMode MarginMode `json:"margin_mode"` Leverage decimal.Decimal `json:"leverage"` StopPrice decimal.Decimal `json:"stop_price"` Trigger string `json:"trigger"` ActivationPrice decimal.Decimal `json:"activation_price"` TrailingDelta decimal.Decimal `json:"trailing_delta"` Reason string `json:"reason"` Status string `json:"status"` }
type V2OhlcResponse ¶
type V2OpenOrdersResponse ¶
type V2OpenOrdersResponse struct { Id string `json:"id"` Datetime string `json:"datetime"` Type string `json:"type"` Price decimal.Decimal `json:"price"` Amount decimal.Decimal `json:"amount"` CurrencyPair string `json:"currency_pair"` ClientOrderId string `json:"client_order_id"` Status string `json:"status"` Reason interface{} `json:"reason"` Leverage *decimal.Decimal `json:"leverage"` MarginMode *MarginMode `json:"margin_mode"` }
Open orders
type V2OrderBookResponse ¶
type V2OrderBookResponse struct { V1OrderBookResponse Microtimestamp string `json:"microtimestamp"` }
type V2OrderStatusResponse ¶
type V2TradingFees ¶ added in v0.0.3
type V2TradingFeesResponse ¶ added in v0.0.3
type V2TradingFeesResponse struct { CurrencyPair string `json:"currency_pair"` Market string `json:"market"` Fees V2TradingFees `json:"fees"` }
type V2TradingPairsInfoResponse ¶
type V2TradingPairsInfoResponse struct { BaseDecimals int `json:"base_decimals"` CounterDecimals int `json:"counter_decimals"` Description string `json:"description"` InstantAndMarketOrders string `json:"instant_and_market_orders"` // TODO: make this a boolean flag MinimumOrder string `json:"minimum_order"` Name string `json:"name"` Trading string `json:"trading"` // TODO: make this a boolean flag UrlSymbol string `json:"url_symbol"` }
type V2TransactionsResponse ¶
type V2TransactionsResponse struct { Amount decimal.Decimal `json:"amount"` // Amount in base (?) Date int64 `json:"date"` // Unix timestamp date and time. Price decimal.Decimal `json:"price"` Tid int64 `json:"tid"` // Transaction ID. Type int8 `json:"type"` // 0 (buy) or 1 (sell). }
func (*V2TransactionsResponse) UnmarshalJSON ¶
func (tx *V2TransactionsResponse) UnmarshalJSON(bytes []byte) error
custom deserialization instructions necessary
type V2UserTransactionsResponse ¶
type V2UserTransactionsResponse struct { Datetime string `json:"datetime"` Fee decimal.Decimal `json:"fee"` Id int64 `json:"id"` OrderId int64 `json:"order_id"` Type string `json:"type"` Status string `json:"status"` Reason interface{} `json:"reason"` // amounts Aave decimal.Decimal `json:"aave"` Algo decimal.Decimal `json:"algo"` Audio decimal.Decimal `json:"audio"` Bat decimal.Decimal `json:"bat"` Bch decimal.Decimal `json:"bch"` Btc decimal.Decimal `json:"btc"` Comp decimal.Decimal `json:"comp"` Crv decimal.Decimal `json:"crv"` Dai decimal.Decimal `json:"dai"` Eth decimal.Decimal `json:"eth"` Eth2 decimal.Decimal `json:"eth2"` Eth2r decimal.Decimal `json:"eth2r"` Eur decimal.Decimal `json:"eur"` Gbp decimal.Decimal `json:"gbp"` Grt decimal.Decimal `json:"grt"` Gusd decimal.Decimal `json:"gusd"` Knc decimal.Decimal `json:"knc"` Link decimal.Decimal `json:"link"` Ltc decimal.Decimal `json:"ltc"` Mkr decimal.Decimal `json:"mkr"` Omg decimal.Decimal `json:"omg"` Pax decimal.Decimal `json:"pax"` Snx decimal.Decimal `json:"snx"` Uma decimal.Decimal `json:"uma"` Uni decimal.Decimal `json:"uni"` Usd decimal.Decimal `json:"usd"` Usdc decimal.Decimal `json:"usdc"` Usdt decimal.Decimal `json:"usdt"` Xlm decimal.Decimal `json:"xlm"` Xrp decimal.Decimal `json:"xrp"` Yfi decimal.Decimal `json:"yfi"` Zrx decimal.Decimal `json:"zrx"` BtcUsd decimal.Decimal `json:"btc_usd"` }
User transactions