types

package
v2.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Fees Fee `json:"fees"`
}

type Asset

type Asset struct {
	// Short version of the asset name used in market names.
	Symbol string `json:"symbol"`

	// The full name of the asset.
	Name string `json:"name"`

	// The precision used for specifying amounts.
	Decimals int64 `json:"decimals"`

	// Fixed fee for depositing this asset.
	DepositFee float64 `json:"depositFee"`

	// The minimum amount of network confirmations required before this asset is credited to your account.
	DepositConfirmations int64 `json:"depositConfirmations"`

	// Enum: "OK" | "MAINTENANCE" | "DELISTED"
	DepositStatus string `json:"depositStatus"`

	// Fixed fee for withdrawing this asset.
	WithdrawalFee float64 `json:"withdrawalFee"`

	// The minimum amount for which a withdrawal can be made.
	WithdrawalMinAmount float64 `json:"withdrawalMinAmount"`

	// Enum: "OK" | "MAINTENANCE" | "DELISTED"
	WithdrawalStatus string `json:"withdrawalStatus"`

	// Supported networks.
	Networks []string `json:"networks"`

	// Shows the reason if withdrawalStatus or depositStatus is not OK.
	Message string `json:"message"`
}

func (*Asset) UnmarshalJSON

func (m *Asset) UnmarshalJSON(bytes []byte) error

type Balance

type Balance struct {
	// Short version of asset name.
	Symbol string `json:"symbol"`

	// Balance freely available.
	Available float64 `json:"available"`

	// Balance currently placed onHold for open orders.
	InOrder float64 `json:"inOrder"`
}

func (*Balance) UnmarshalJSON

func (b *Balance) UnmarshalJSON(bytes []byte) error

type BitvavoErr

type BitvavoErr struct {
	Code    int    `json:"errorCode"`
	Message string `json:"error"`
	Action  string `json:"action"`
}

func (*BitvavoErr) Error

func (b *BitvavoErr) Error() string

type Book

type Book struct {
	// Integer which is increased by one for every update to the book. Useful for synchronizing. Resets to zero after restarting the matching engine.
	Nonce int64 `json:"nonce"`

	// Slice with all bids in the format [price, size], where an size of 0 means orders are no longer present at that price level,
	// otherwise the returned size is the new total size on that price level.
	Bids []Page `json:"bids"`

	// Slice with all asks in the format [price, size], where an size of 0 means orders are no longer present at that price level,
	// otherwise the returned size is the new total size on that price level.
	Asks []Page `json:"asks"`
}

func (*Book) UnmarshalJSON

func (b *Book) UnmarshalJSON(bytes []byte) error

type Candle

type Candle struct {
	// Timestamp in unix milliseconds.
	Timestamp int64   `json:"timestamp"`
	Open      float64 `json:"open"`
	High      float64 `json:"high"`
	Low       float64 `json:"low"`
	Close     float64 `json:"close"`
	Volume    float64 `json:"volume"`
}

func (*Candle) UnmarshalJSON

func (c *Candle) UnmarshalJSON(bytes []byte) error

type CandleParams

type CandleParams struct {
	// Return the limit most recent candlesticks only.
	// Default: 1440
	Limit uint64 `json:"limit"`

	// Return limit candlesticks for trades made after start.
	Start time.Time `json:"start"`

	// Return limit candlesticks for trades made before end.
	End time.Time `json:"end"`
}

func (*CandleParams) Params

func (c *CandleParams) Params() url.Values

type DepositAsset added in v2.6.0

type DepositAsset struct {
	// The address to which cryptocurrencies can be sent to increase the account balance.
	//
	// NOTICE: for digital deposits
	Address string `json:"address"`

	// If a paymentid is supplied, attaching this to your deposit is required. This is mostly called a note, memo or tag.
	//
	// NOTICE: for digital deposits
	PaymentId string `json:"paymentid"`

	// IBAN number to wire your deposit to.
	//
	// NOTICE: for fiat deposits
	IBAN string `json:"iban"`

	// Optional code sometimes necessary for international transfers.
	//
	// NOTICE: for fiat deposits
	BIC string `json:"bic"`

	// Description which must be used for the deposit.
	//
	// NOTICE: for fiat deposits
	Description string `json:"description"`
}

type DepositHistory added in v2.6.0

type DepositHistory struct {
	// The time your deposit of symbol was received by Bitvavo.
	Timestamp int64 `json:"timestamp"`

	// The short name of the base currency you deposited with Bitvavo. For example, BTC for Bitcoin or EUR for euro.
	Symbol string `json:"symbol"`

	// The quantity of symbol you deposited with Bitvavo.
	Amount float64 `json:"amount"`

	// The identifier for the account you sent amount of symbol from. For example, NL89BANK0123456789 or a digital address (e.g: 14qViLJfdGaP4EeHnDyJbEGQysnCpwk3gd).
	Address string `json:"address"`

	// The identifier for this deposit. If you did not set a ID when you made this deposit, this parameter is not included in the response.
	//
	// NOTICE: digital currency only
	PaymentId string `json:"paymentId"`

	// The ID for this transaction on the blockchain.
	//
	// NOTICE: digital currency only
	TxId string `json:"txId"`

	// The transaction fee you paid to deposit amount of symbol on Bitvavo.
	Fee float64 `json:"fee"`

	// The current state of this deposit. Possible values are:
	// completed - amount of symbol has been added to your balance on Bitvavo.
	// canceled - this deposit could not be completed.
	//
	// NOTICE: fiat currency only
	Status string `json:"status"`
}

func (*DepositHistory) UnmarshalJSON added in v2.6.0

func (d *DepositHistory) UnmarshalJSON(bytes []byte) error

type DepositHistoryParams added in v2.6.0

type DepositHistoryParams struct {
	// When no symbol is specified, all deposits will be returned.
	Symbol string `json:"symbol"`

	// Return the limit most recent assets only.
	// Default: 500
	Limit uint64 `json:"limit"`

	// Return orders after start time.
	Start time.Time `json:"start"`

	// Return orders before end time.
	End time.Time `json:"end"`
}

func (*DepositHistoryParams) Params added in v2.6.0

func (d *DepositHistoryParams) Params() url.Values

type Fee

type Fee struct {
	// Fee for trades that take liquidity from the order book.
	Taker float64 `json:"taker"`

	// Fee for trades that add liquidity to the order book.
	Maker float64 `json:"maker"`

	// Your trading volume in the last 30 days measured in EUR.
	Volume float64 `json:"volume"`
}

func (*Fee) UnmarshalJSON

func (f *Fee) UnmarshalJSON(bytes []byte) error

type Fill

type Fill struct {
	// The id of the returned fill
	FillId string `json:"fillId"`

	// The id of the order on which has been filled
	OrderId string `json:"orderId"`

	// The current timestamp in milliseconds since 1 Jan 1970
	Timestamp int64 `json:"timestamp"`

	// The amount in base currency for which the trade has been made
	Amount float64 `json:"amount"`

	// The side for the taker
	// Enum: "buy" | "sell"
	Side string `json:"side"`

	// The price in quote currency for which the trade has been made
	Price float64 `json:"price"`

	// True for takers, false for makers
	Taker bool `json:"taker"`

	// The amount of fee that has been paid. Value is negative for rebates. Only available if settled is true
	Fee float64 `json:"fee"`

	// Currency in which the fee has been paid. Only available if settled is true
	FeeCurrency string `json:"feeCurrency"`

	// True when the fee has been deducted and the bought/sold currency is available for further trading.
	// Fills are settled almost instantly.
	Settled bool `json:"settled"`
}

func (*Fill) UnmarshalJSON

func (f *Fill) UnmarshalJSON(bytes []byte) error

type Market

type Market struct {
	// The market itself
	Market string `json:"market"`

	// Enum: "trading" | "halted" | "auction"
	Status string `json:"status"`

	// Base currency, found on the left side of the dash in market.
	Base string `json:"base"`

	// Quote currency, found on the right side of the dash in market.
	Quote string `json:"quote"`

	// Price precision determines how many significant digits are allowed. The rationale behind this is that for higher amounts, smaller price increments are less relevant.
	// Examples of valid prices for precision 5 are: 100010, 11313, 7500.10, 7500.20, 500.12, 0.0012345.
	// Examples of precision 6 are: 11313.1, 7500.11, 7500.25, 500.123, 0.00123456.
	PricePrecision int64 `json:"pricePrecision"`

	// The minimum amount in quote currency (amountQuote or amount * price) for valid orders.
	MinOrderInBaseAsset float64 `json:"minOrderInBaseAsset"`

	// The minimum amount in base currency for valid orders.
	MinOrderInQuoteAsset float64 `json:"minOrderInQuoteAsset"`

	// // The maximum amount in quote currency (amountQuote or amount * price) for valid orders.
	MaxOrderInBaseAsset float64 `json:"maxOrderInBaseAsset"`

	// The maximum amount in base currency for valid orders.
	MaxOrderInQuoteAsset float64 `json:"maxOrderInQuoteAsset"`

	// Allowed order types for this market.
	OrderTypes []string `json:"orderTypes"`
}

func (*Market) UnmarshalJSON

func (m *Market) UnmarshalJSON(bytes []byte) error

type Order

type Order struct {
	// The order id of the returned order.
	OrderId string `json:"orderId"`

	// The market in which the order was placed.
	Market string `json:"market"`

	// Is a timestamp in milliseconds since 1 Jan 1970.
	Created int64 `json:"created"`

	// Is a timestamp in milliseconds since 1 Jan 1970.
	Updated int64 `json:"updated"`

	// The current status of the order.
	// Enum: "new" | "awaitingTrigger" | "canceled" | "canceledAuction" | "canceledSelfTradePrevention" | "canceledIOC" | "canceledFOK" | "canceledMarketProtection" | "canceledPostOnly" | "filled" | "partiallyFilled" | "expired" | "rejected"
	Status string `json:"status"`

	// Side
	// Enum: "buy" | "sell"
	Side string `json:"side"`

	// OrderType
	// Enum: "market" | "limit" | "stopLoss" | "stopLossLimit" | "takeProfit" | "takeProfitLimit"
	OrderType string `json:"orderType"`

	// Original amount.
	Amount float64 `json:"amount"`

	// Amount remaining (lower than 'amount' after fills).
	AmountRemaining float64 `json:"amountRemaining"`

	// The price of the order.
	Price float64 `json:"price"`

	// Amount of 'onHoldCurrency' that is reserved for this order. This is released when orders are canceled.
	OnHold float64 `json:"onHold"`

	// The currency placed on hold is the quote currency for sell orders and base currency for buy orders.
	OnHoldCurrency string `json:"onHoldCurrency"`

	// Only for stop orders: The current price used in the trigger. This is based on the triggerAmount and triggerType.
	TriggerPrice float64 `json:"triggerPrice"`

	// Only for stop orders: The value used for the triggerType to determine the triggerPrice.
	TriggerAmount float64 `json:"triggerAmount"`

	// Only for stop orders.
	//
	// Enum: "price"
	TriggerType string `json:"triggerType"`

	// Only for stop orders: The reference price used for stop orders.
	// Enum: "lastTrade" | "bestBid" | "bestAsk" | "midPrice"
	TriggerReference string `json:"triggerReference"`

	// Only for limit orders: Determines how long orders remain active.
	// Possible values: Good-Til-Canceled (GTC), Immediate-Or-Cancel (IOC), Fill-Or-Kill (FOK).
	// GTC orders will remain on the order book until they are filled or canceled.
	// IOC orders will fill against existing orders, but will cancel any remaining amount after that.
	// FOK orders will fill against existing orders in its entirety, or will be canceled (if the entire order cannot be filled).
	//
	// Enum: "GTC" | "IOC" | "FOK"
	TimeInForce string `json:"timeInForce"`

	// Default: false
	PostOnly bool `json:"postOnly"`

	// Self trading is not allowed on Bitvavo. Multiple options are available to prevent this from happening.
	// The default ‘decrementAndCancel’ decrements both orders by the amount that would have been filled, which in turn cancels the smallest of the two orders.
	// ‘cancelOldest’ will cancel the entire older order and places the new order.
	// ‘cancelNewest’ will cancel the order that is submitted.
	// ‘cancelBoth’ will cancel both the current and the old order.
	//
	// Default: "decrementAndCancel"
	// Enum: "decrementAndCancel" | "cancelOldest" | "cancelNewest" | "cancelBoth"
	SelfTradePrevention string `json:"selfTradePrevention"`

	// Whether this order is visible on the order book.
	Visible bool `json:"visible"`

	// The fills for this order
	Fills []Fill `json:"fills"`

	// How much of this order is filled
	FilledAmount float64 `json:"filledAmount"`

	// How much of this order is filled in quote currency
	FilledAmountQuote float64 `json:"filledAmountQuote"`

	// The currency in which the fee is paid (e.g: EUR)
	FeeCurrency string `json:"feeCurrency"`

	// How much fee is paid
	FeePaid float64 `json:"feePaid"`
}

func (*Order) UnmarshalJSON

func (o *Order) UnmarshalJSON(bytes []byte) error

type OrderNew added in v2.3.0

type OrderNew struct {
	// The market in which the order should be placed (e.g: ETH-EUR)
	Market string `json:"market"`

	// When placing a buy order the base currency will be bought for the quote currency. When placing a sell order the base currency will be sold for the quote currency.
	//
	// Enum: "buy" | "sell"
	Side string `json:"side"`

	// For limit orders, amount and price are required. For market orders either amount or amountQuote is required.
	//
	// Enum: "market" | "limit" | "stopLoss" | "stopLossLimit" | "takeProfit" | "takeProfitLimit"
	OrderType string `json:"orderType"`

	// Specifies the amount of the base asset that will be bought/sold.
	Amount float64 `json:"amount,omitempty"`

	// Only for limit orders: Specifies the amount in quote currency that is paid/received for each unit of base currency.
	Price float64 `json:"price,omitempty"`

	// Only for market orders: If amountQuote is specified, [amountQuote] of the quote currency will be bought/sold for the best price available.
	AmountQuote float64 `json:"amountQuote,omitempty"`

	// Only for stop orders: Specifies the amount that is used with the triggerType.
	// Combine this parameter with triggerType and triggerReference to create the desired trigger.
	TriggerAmount float64 `json:"triggerAmount,omitempty"`

	// Only for stop orders: Only allows price for now. A triggerAmount of 4000 and a triggerType of price will generate a triggerPrice of 4000.
	// Combine this parameter with triggerAmount and triggerReference to create the desired trigger.
	//
	// Enum: "price"
	TriggerType string `json:"triggerType,omitempty"`

	// Only for stop orders: Use this to determine which parameter will trigger the order.
	// Combine this parameter with triggerAmount and triggerType to create the desired trigger.
	//
	// Enum: "lastTrade" | "bestBid" | "bestAsk" | "midPrice"
	TriggerReference string `json:"triggerReference,omitempty"`

	// Only for limit orders: Determines how long orders remain active.
	// Possible values: Good-Til-Canceled (GTC), Immediate-Or-Cancel (IOC), Fill-Or-Kill (FOK).
	// GTC orders will remain on the order book until they are filled or canceled.
	// IOC orders will fill against existing orders, but will cancel any remaining amount after that.
	// FOK orders will fill against existing orders in its entirety, or will be canceled (if the entire order cannot be filled).
	//
	// Enum: "GTC" | "IOC" | "FOK"
	// Default: "GTC"
	TimeInForce string `json:"timeInForce,omitempty"`

	// Self trading is not allowed on Bitvavo. Multiple options are available to prevent this from happening.
	// The default ‘decrementAndCancel’ decrements both orders by the amount that would have been filled, which in turn cancels the smallest of the two orders.
	// ‘cancelOldest’ will cancel the entire older order and places the new order.
	// ‘cancelNewest’ will cancel the order that is submitted.
	// ‘cancelBoth’ will cancel both the current and the old order.
	// Default: "decrementAndCancel"
	//
	// Enum: "decrementAndCancel" | "cancelOldest" | "cancelNewest" | "cancelBoth"
	// Default: "decrementAndCancel"
	SelfTradePrevention string `json:"selfTradePrevention,omitempty"`

	// Only for limit orders: When postOnly is set to true, the order will not fill against existing orders.
	// This is useful if you want to ensure you pay the maker fee. If the order would fill against existing orders, the entire order will be canceled.
	//
	// Default: false
	PostOnly bool `json:"postOnly,omitempty"`

	// Only for market orders: In order to protect clients from filling market orders with undesirable prices,
	// the remainder of market orders will be canceled once the next fill price is 10% worse than the best fill price (best bid/ask at first match).
	// If you wish to disable this protection, set this value to ‘true’.
	//
	// Default: false
	DisableMarketProtection bool `json:"disableMarketProtection,omitempty"`

	// If this is set to 'true', all order information is returned.
	// Set this to 'false' when only an acknowledgement of success or failure is required, this is faster.
	//
	// Default: true
	ResponseRequired bool `json:"responseRequired,omitempty"`
}

type OrderParams added in v2.2.1

type OrderParams struct {
	// Return the limit most recent orders only.
	// Default: 500
	Limit uint64 `json:"limit"`

	// Return orders after start time.
	Start time.Time `json:"start"`

	// Return orders before end time.
	End time.Time `json:"end"`

	// Filter used to limit the returned results.
	// All orders after this order ID are returned (i.e. showing those later in time).
	OrderIdFrom string `json:"orderIdFrom"`

	// Filter used to limit the returned results.
	// All orders up to this order ID are returned (i.e. showing those earlier in time).
	OrderIdTo string `json:"orderIdTo"`
}

func (*OrderParams) Params added in v2.2.1

func (o *OrderParams) Params() url.Values

type OrderUpdate added in v2.3.0

type OrderUpdate struct {
	// The market for which an order should be updated
	Market string `json:"market"`

	// The id of the order which should be updated
	OrderId string `json:"orderId"`

	// Updates amount to this value (and also changes amountRemaining accordingly).
	Amount float64 `json:"amount,omitempty"`

	// Only for market orders: If amountQuote is specified, [amountQuote] of the quote currency will be bought/sold for the best price available.
	AmountQuote float64 `json:"amountQuote,omitempty"`

	// Updates amountRemaining to this value (and also changes amount accordingly).
	AmountRemaining float64 `json:"amountRemaining,omitempty"`

	// Specifies the amount in quote currency that is paid/received for each unit of base currency.
	Price float64 `json:"price,omitempty"`

	// Only for stop orders: Specifies the amount that is used with the triggerType.
	// Combine this parameter with triggerType and triggerReference to create the desired trigger.
	TriggerAmount float64 `json:"triggerAmount,omitempty"`

	// Only for limit orders: Determines how long orders remain active.
	// Possible values: Good-Til-Canceled (GTC), Immediate-Or-Cancel (IOC), Fill-Or-Kill (FOK).
	// GTC orders will remain on the order book until they are filled or canceled.
	// IOC orders will fill against existing orders, but will cancel any remaining amount after that.
	// FOK orders will fill against existing orders in its entirety, or will be canceled (if the entire order cannot be filled).
	//
	// Enum: "GTC" | "IOC" | "FOK"
	// Default: "GTC"
	TimeInForce string `json:"timeInForce,omitempty"`

	// Self trading is not allowed on Bitvavo. Multiple options are available to prevent this from happening.
	// The default ‘decrementAndCancel’ decrements both orders by the amount that would have been filled, which in turn cancels the smallest of the two orders.
	// ‘cancelOldest’ will cancel the entire older order and places the new order.
	// ‘cancelNewest’ will cancel the order that is submitted.
	// ‘cancelBoth’ will cancel both the current and the old order.
	// Default: "decrementAndCancel"
	//
	// Enum: "decrementAndCancel" | "cancelOldest" | "cancelNewest" | "cancelBoth"
	// Default: "decrementAndCancel"
	SelfTradePrevention string `json:"selfTradePrevention,omitempty"`

	// Only for limit orders: When postOnly is set to true, the order will not fill against existing orders.
	// This is useful if you want to ensure you pay the maker fee. If the order would fill against existing orders, the entire order will be canceled.
	//
	// Default: false
	PostOnly bool `json:"postOnly,omitempty"`

	// If this is set to 'true', all order information is returned.
	// Set this to 'false' when only an acknowledgement of success or failure is required, this is faster.
	//
	// Default: true
	ResponseRequired bool `json:"responseRequired,omitempty"`
}

type Page

type Page struct {
	// Bid / ask price.
	Price float64 `json:"price"`

	//  Size of 0 means orders are no longer present at that price level, otherwise the returned size is the new total size on that price level.
	Size float64 `json:"size"`
}

type Ticker

type Ticker struct {
	// The price of the best (highest) bid offer available, only sent when either bestBid or bestBidSize has changed.
	BestBid float64 `json:"bestBid"`

	// The size of the best (highest) bid offer available, only sent when either bestBid or bestBidSize has changed.
	BestBidSize float64 `json:"bestBidSize"`

	// The price of the best (lowest) ask offer available, only sent when either bestAsk or bestAskSize has changed.
	BestAsk float64 `json:"bestAsk"`

	// The size of the best (lowest) ask offer available, only sent when either bestAsk or bestAskSize has changed.
	BestAskSize float64 `json:"bestAskSize"`

	// The last price for which a trade has occurred, only sent when lastPrice has changed.
	LastPrice float64 `json:"lastPrice"`
}

func (*Ticker) UnmarshalJSON

func (t *Ticker) UnmarshalJSON(bytes []byte) error

type Ticker24h

type Ticker24h struct {
	// The open price of the 24 hour period.
	Open float64 `json:"open"`

	// The highest price for which a trade occurred in the 24 hour period.
	High float64 `json:"high"`

	// The lowest price for which a trade occurred in the 24 hour period.
	Low float64 `json:"low"`

	// The last price for which a trade occurred in the 24 hour period.
	Last float64 `json:"last"`

	// The total volume of the 24 hour period in base currency.
	Volume float64 `json:"volume"`

	// The total volume of the 24 hour period in quote currency.
	VolumeQuote float64 `json:"volumeQuote"`

	// The best (highest) bid offer at the current moment.
	Bid float64 `json:"bid"`

	// The size of the best (highest) bid offer.
	BidSize float64 `json:"bidSize"`

	// The best (lowest) ask offer at the current moment.
	Ask float64 `json:"ask"`

	// The size of the best (lowest) ask offer.
	AskSize float64 `json:"askSize"`

	// Timestamp in unix milliseconds.
	Timestamp int64 `json:"timestamp"`

	// Start timestamp in unix milliseconds.
	StartTimestamp int64 `json:"startTimestamp"`

	// Open timestamp in unix milliseconds.
	OpenTimestamp int64 `json:"openTimestamp"`

	// Close timestamp in unix milliseconds.
	CloseTimestamp int64 `json:"closeTimestamp"`
}

func (*Ticker24h) UnmarshalJSON

func (t *Ticker24h) UnmarshalJSON(bytes []byte) error

type TickerBook

type TickerBook struct {
	// The market you requested the current best orders for.
	Market string `json:"market"`

	// The highest buy order in quote currency for market currently available on Bitvavo.
	Bid float64 `json:"bid"`

	// The amount of base currency for bid in the order.
	BidSize float64 `json:"bidSize"`

	// The lowest sell order in quote currency for market currently available on Bitvavo.
	Ask float64 `json:"ask"`

	// The amount of base currency for ask in the order.
	AskSize float64 `json:"askSize"`
}

func (*TickerBook) UnmarshalJSON

func (t *TickerBook) UnmarshalJSON(bytes []byte) error

type TickerPrice

type TickerPrice struct {
	// The market you requested the latest trade price for.
	Market string `json:"market"`

	// The latest trade price for 1 base currency in quote currency for market. For example, 34243 Euro.
	Price float64 `json:"price"`
}

func (*TickerPrice) UnmarshalJSON

func (t *TickerPrice) UnmarshalJSON(bytes []byte) error

type Trade

type Trade struct {
	// The trade ID of the returned trade (UUID).
	Id string `json:"id"`

	// The amount in base currency for which the trade has been made.
	Amount float64 `json:"amount"`

	// The price in quote currency for which the trade has been made.
	Price float64 `json:"price"`

	// The side for the taker.
	// Enum: "buy" | "sell"
	Side string `json:"side"`

	// Timestamp in unix milliseconds.
	Timestamp int64 `json:"timestamp"`
}

func (*Trade) UnmarshalJSON

func (t *Trade) UnmarshalJSON(bytes []byte) error

type TradeHistoric added in v2.3.0

type TradeHistoric Fill

type TradeParams

type TradeParams struct {
	// Return the limit most recent trades only.
	// Default: 500
	Limit uint64 `json:"limit"`

	// Return limit trades executed after start.
	Start time.Time `json:"start"`

	// Return limit trades executed before end.
	End time.Time `json:"end"`

	// Return limit trades executed after tradeIdFrom was made.
	TradeIdFrom string `json:"tradeIdFrom"`

	// Return limit trades executed before tradeIdTo was made.
	TradeIdTo string `json:"tradeIdTo"`
}

func (*TradeParams) Params

func (t *TradeParams) Params() url.Values

type WithDrawalResponse added in v2.6.0

type WithDrawalResponse struct {
	// Returns true for successful withdrawal requests.
	Success bool `json:"success"`

	// The short name of the asset. For example, BTC for Bitcoin.
	Symbol string `json:"symbol"`

	// Total amount that has been deducted from your balance.
	Amount float64 `json:"amount"`
}

func (*WithDrawalResponse) UnmarshalJSON added in v2.6.0

func (r *WithDrawalResponse) UnmarshalJSON(bytes []byte) error

type Withdrawal added in v2.6.0

type Withdrawal struct {
	// The short name of the asset. For example, BTC for Bitcoin.
	Symbol string `json:"symbol"`

	// Total amount that has been deducted from your balance.
	Amount float64 `json:"amount"`

	// Wallet address or IBAN.
	// For digital assets: please double check this address. Funds sent can not be recovered.
	Address string `json:"address"`

	// For digital assets only. Payment IDs are used to identify transactions to merchants and exchanges with a single address. This is mostly called a note, memo or tag. Should be set when withdrawing straight to another exchange or merchants that require payment id's.
	PaymentId string `json:"paymentId,omitempty"`

	// For digital assets only.
	// Should be set to true if the withdrawal must be sent to another Bitvavo user internally.
	// No transaction will be broadcast to the blockchain and no fees will be applied.
	// This operation fails if the wallet does not belong to a Bitvavo user.
	Internal bool `json:"internal,omitempty"`

	// If set to true, the fee will be added on top of the requested amount,
	// otherwise the fee is part of the requested amount and subtracted from the withdrawal.
	AddWithdrawalFee bool `json:"addWithdrawalFee,omitempty"`
}

type WithdrawalHistory added in v2.6.0

type WithdrawalHistory struct {
	// The time your withdrawal of symbol was received by Bitvavo.
	Timestamp int64 `json:"timestamp"`

	// The short name of the asset. For example, BTC for Bitcoin.
	Symbol string `json:"symbol"`

	// Amount that has been withdrawn.
	Amount float64 `json:"amount"`

	// Address that has been used for this withdrawal.
	Address string `json:"address"`

	// Payment ID used for this withdrawal. This is mostly called a note, memo or tag. Will not be returned if it was not used.
	PaymentId string `json:"paymentId"`

	// The transaction ID, which can be found on the blockchain, for this specific withdrawal.
	TxId string `json:"txId"`

	// The fee which has been paid to withdraw this currency.
	Fee float64 `json:"fee"`

	// The status of the withdrawal.
	// Enum: "awaiting_processing" | "awaiting_email_confirmation" | "awaiting_bitvavo_inspection" |
	// "approved" | "sending" | "in_mempool" | "processed" | "completed" | "canceled"
	Status string `json:"status"`
}

func (*WithdrawalHistory) UnmarshalJSON added in v2.6.0

func (w *WithdrawalHistory) UnmarshalJSON(bytes []byte) error

type WithdrawalHistoryParams added in v2.6.0

type WithdrawalHistoryParams struct {
	// When no symbol is specified, all withdrawal will be returned.
	Symbol string `json:"symbol"`

	// Return the limit most recent assets only.
	// Default: 500
	Limit uint64 `json:"limit"`

	// Return orders after start time.
	Start time.Time `json:"start"`

	// Return orders before end time.
	End time.Time `json:"end"`
}

func (*WithdrawalHistoryParams) Params added in v2.6.0

func (w *WithdrawalHistoryParams) Params() url.Values

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL