inout

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcctSummaryIn

type AcctSummaryIn struct {
	Ccy      string `json:"currency"`
	Extended bool   `json:"extended,omitempty"`
}

AcctSummaryIn is arguments to query for account summary

type AcctSummaryOut

type AcctSummaryOut struct {
	AvailableFunds    float64    `json:"available_funds"`
	AvailableWdrFunds float64    `json:"available_withdrawal_funds"`
	Blnc              float64    `json:"balance"`
	Ccy               string     `json:"currency"`
	DeltaTotal        float64    `json:"delta_total"`
	DepositAddr       string     `json:"deposit_address"`
	Email             string     `json:"email"`
	Equity            float64    `json:"equity"`
	FuturesPl         float64    `json:"futures_pl"`
	FuturesSessionRpl float64    `json:"futures_session_rpl"`
	FuturesSessionUpl float64    `json:"futures_session_upl"`
	ID                int        `json:"id"`
	InitMrgn          float64    `json:"initial_margin"`
	Limits            RateLimits `json:"limits"`
	MntcMrgn          float64    `json:"maintenance_margin"`
	MrgnBlnc          float64    `json:"margin_balance"`
	OptnsDelta        float64    `json:"options_delta"`
	OptnsGamma        float64    `json:"options_gamma"`
	OptnsPl           float64    `json:"options_pl"`
	OptnsSessionRpl   float64    `json:"options_session_rpl"`
	OptnsSessionUpl   float64    `json:"options_session_upl"`
	OptnsTheta        float64    `json:"options_theta"`
	OptnsVega         float64    `json:"options_vega"`
	PrtflioMrgnEnbld  bool       `json:"portfolio_margining_enabled"`
	SessionFunding    float64    `json:"session_funding"`
	SessionRpl        float64    `json:"session_rpl"`
	SessionUpl        float64    `json:"session_upl"`
	SysName           string     `json:"system_name"`
	TfaEnbld          bool       `json:"tfa_enabled"`
	TotalPl           float64    `json:"total_pl"`
	Type              string     `json:"type"`
	UserName          string     `json:"username"`
}

AcctSummaryOut contains info about your account

type AuthOut

type AuthOut struct {
	AccessToken  string `json:"access_token"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	Scope        string `json:"scope"`
	State        string `json:"state"`
	TokenType    string `json:"token_type"`
}

type BkSummaryByCcyIn

type BkSummaryByCcyIn struct {
	Ccy  string `json:"currency"`
	Kind string `json:"kind,omitempty"`
}

type BkSummaryByInstrmtIn

type BkSummaryByInstrmtIn struct {
	Instrument string `json:"instrument_name"`
}

type BkSummaryOut

type BkSummaryOut struct {
	Volume       float64 `json:"volume"`
	UndrlyngPrc  float64 `json:"underlying_price"`
	UndrlyngIndx string  `json:"underlying_index"`
	QutCcy       string  `json:"quote_currency"`
	OpnIntrst    float64 `json:"open_interest"`
	Mid          float64 `json:"mid_price"`
	Mark         float64 `json:"mark_price"`
	Low          float64 `json:"low"`
	Last         float64 `json:"last"`
	IntRate      float64 `json:"interest_rate"`
	Instrument   string  `json:"instrument_name"`
	High         float64 `json:"high"`
	CreatnTmStmp int64   `json:"creation_timestamp"`
	Bid          float64 `json:"bid_price"`
	BaseCcy      string  `json:"base_currency"`
	Ask          float64 `json:"ask_price"`
}

type BookIn

type BookIn struct {
	Instrument string `json:"instrument_name"`
	Depth      int    `json:"depth,omitempty"`
}

type BookOut

type BookOut struct {
	TmStmp         int64       `json:"timestamp"`
	Stats          TckrStats   `json:"stats"`
	State          string      `json:"state"`
	StlmntPrc      float64     `json:"settlement_price"`
	OpnIntrst      float64     `json:"open_interest"`
	MinPrc         float64     `json:"min_price"`
	MaxPrc         float64     `json:"max_price"`
	Mark           float64     `json:"mark_price"`
	Last           float64     `json:"last_price"`
	Instrument     string      `json:"instrument_name"`
	IndxPrc        float64     `json:"index_price"`
	Funding8h      float64     `json:"funding_8h"`
	CurrentFunding float64     `json:"current_funding"`
	ChgId          int         `json:"change_id"`
	Bids           [][]float64 `json:"bids"`
	BestBid        float64     `json:"best_bid_price"`
	BestBidAmt     float64     `json:"best_bid_amount"`
	BestAsk        float64     `json:"best_ask_price"`
	BestAskAmt     float64     `json:"best_ask_amount"`
	Asks           [][]float64 `json:"asks"`
}

type CancelAllByCcyIn

type CancelAllByCcyIn struct {
	Ccy  string `json:"currency"`
	Kind string `json:"kind,omitempty"`
	Type string `json:"type,omitempty"`
}

type CancelAllByInstrmtIn

type CancelAllByInstrmtIn struct {
	Instrument string `json:"instrument_name"`
	Type       string `json:"type,omitempty"`
}

type CancelOrderIn

type CancelOrderIn struct {
	OrderID string `json:"order_id"`
}

type ClientCredentials

type ClientCredentials struct {
	GrantType    string `json:"grant_type"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

type CntrctSzIn

type CntrctSzIn struct {
	Instrument string `json:"instrument_name"`
}

type CntrctSzOut

type CntrctSzOut struct {
	CntrctSz float64 `json:"contract_size"`
}

type Currency

type Currency struct {
	CoinType                       string               `json:"coin_type"`
	Ccy                            string               `json:"currency"`
	CcyLong                        string               `json:"currency_long"`
	DisabledDepositAddressCreation bool                 `json:"disabled_deposit_address_creation"`
	FeePrecision                   int                  `json:"fee_precision"`
	MinConfirmations               int                  `json:"min_confirmations"`
	MinWithdrawalFee               float64              `json:"min_withdrawal_fee"`
	WithdrawalFee                  float64              `json:"withdrawal_fee"`
	WithdrawalPriorities           []WithdrawalPriority `json:"withdrawal_priorities"`
}

type DrbtPrcRnk

type DrbtPrcRnk struct {
	Wgt        float64 `json:"weight"`
	TmStmp     int64   `json:"timestamp"`
	Prc        float64 `json:"price"`
	Identifier string  `json:"identifier"`
	Enabled    bool    `json:"enabled"`
}

type EditIn

type EditIn struct {
	OrderID  string  `json:"order_id"`
	Amt      float64 `json:"amount"`
	Prc      float64 `json:"price"`
	PostOnly bool    `json:"post_only,omitempty"`
	Advanced string  `json:"advanced,omitempty"`
	StopPrc  float64 `json:"stop_price,omitempty"`
}

type Heartbeat

type Heartbeat struct {
	Interval float64 `json:"interval"`
}

type HistVolIn added in v1.3.0

type HistVolIn IndxIn

type IndxIn

type IndxIn struct {
	Ccy string `json:"currency"`
}

type IndxOut

type IndxOut struct {
	BTC float64 `json:"BTC"`
	ETH float64 `json:"ETH"`
	EDP float64 `json:"edp"`
}

type InstrumentIn

type InstrumentIn struct {
	Ccy     string `json:"currency"`
	Kind    string `json:"kind,omitempty"`
	Expired bool   `json:"expired,omitempty"`
}

type InstrumentOut

type InstrumentOut struct {
	BaseCcy         string  `json:"base_currency"`
	ContractSz      float64 `json:"contract_size"`
	CreatnTmStmp    int64   `json:"creation_timestamp"`
	ExprtnTmStmp    int64   `json:"expiration_timestamp"`
	Kind            string  `json:"kind"`
	Instrument      string  `json:"instrument_name"`
	IsActive        bool    `json:"is_active"`
	MakerCommission float64 `json:"maker_commission"`
	MinTrdAmt       float64 `json:"min_trade_amount"`
	OptnType        string  `json:"option_type"`
	QutCcy          string  `json:"quote_currency"`
	StlmntPrd       string  `json:"settlement_period"`
	Strike          float64 `json:"strike"`
	TakerCommission float64 `json:"taker_commission"`
	TckSz           float64 `json:"tick_size"`
}

InstrumentOut is the output argument for instrument queries

type LastTradesOut

type LastTradesOut struct {
	HasMore bool    `json:"has_more"`
	Trades  []Trade `json:"trades"`
}

type MrkPrcOptn

type MrkPrcOptn struct {
	IV         float64 `json:"iv"`
	Instrument string  `json:"instrument_name"`
	Mark       float64 `json:"mark_price"`
}

type NtfctnAnncmnt

type NtfctnAnncmnt struct {
	Actn      string `json:"action"`
	Body      string `json:"body"`
	Date      int64  `json:"date"`
	ID        int    `json:"id"`
	Important bool   `json:"important"`
	Number    int    `json:"number"`
	Title     string `json:"title"`
}

type NtfctnDrbtPrcIndx

type NtfctnDrbtPrcIndx struct {
	TmStmp int64   `json:"timestamp"`
	Prc    float64 `json:"price"`
	Indx   string  `json:"index_name"`
}

type NtfctnDrbtPrcRnk

type NtfctnDrbtPrcRnk []DrbtPrcRnk

type NtfctnEstmtdExprtnPrc

type NtfctnEstmtdExprtnPrc struct {
	Seconds     int     `json:"seconds"`
	Prc         float64 `json:"price"`
	IsEstimated bool    `json:"is_estimated"`
}

type NtfctnItmOrdrBk

type NtfctnItmOrdrBk struct {
	Actn string  `json:"action"`
	Prc  float64 `json:"price"`
	Amt  float64 `json:"amount"`
}

NtfctnItmOrdrBk ... ["change",6947.0,82640.0] ["new",6942.5,6940.0] ["delete",6914.0,0.0]

func (*NtfctnItmOrdrBk) UnmarshalJSON

func (item *NtfctnItmOrdrBk) UnmarshalJSON(b []byte) error

type NtfctnMrkPrcOptns

type NtfctnMrkPrcOptns []MrkPrcOptn

type NtfctnOrdrBk

type NtfctnOrdrBk struct {
	Type       string            `json:"type"`
	TmStmp     int64             `json:"timestamp"`
	Instrument string            `json:"instrument_name"`
	PrvChgID   int64             `json:"prev_change_id"`
	ChgID      int64             `json:"change_id"`
	Bids       []NtfctnItmOrdrBk `json:"bids"` // [action, price, amount]
	Asks       []NtfctnItmOrdrBk `json:"asks"` // [action, price, amount]
}

type NtfctnOrdrBkGrp

type NtfctnOrdrBkGrp struct {
	TmStmp     int64       `json:"timestamp"`
	Instrument string      `json:"instrument_name"`
	ChgID      int64       `json:"change_id"`
	Bids       [][]float64 `json:"bids"` // [price, amount]
	Asks       [][]float64 `json:"asks"` // [price, amount]
}

type NtfctnOrdrBkRaw

type NtfctnOrdrBkRaw struct {
	TmStmp     int64             `json:"timestamp"`
	Instrument string            `json:"instrument_name"`
	PrvChgID   int64             `json:"prev_change_id"`
	ChgID      int64             `json:"change_id"`
	Bids       []NtfctnItmOrdrBk `json:"bids"` // [action, price, amount]
	Asks       []NtfctnItmOrdrBk `json:"asks"` // [action, price, amount]
}

type NtfctnPrptl

type NtfctnPrptl struct {
	Interest float64 `json:"interest"`
}

type NtfctnPrtflio

type NtfctnPrtflio struct {
	TotalPl           float64 `json:"total_pl"`
	SessionUpl        float64 `json:"session_upl"`
	SessionRpl        float64 `json:"session_rpl"`
	SessionFunding    float64 `json:"session_funding"`
	PrtflioMrgnEnbld  bool    `json:"portfolio_margining_enabled"`
	OptnsVega         float64 `json:"options_vega"`
	OptnsTheta        float64 `json:"options_theta"`
	OptnsSessionUpl   float64 `json:"options_session_upl"`
	OptnsSessionRpl   float64 `json:"options_session_rpl"`
	OptnsPl           float64 `json:"options_pl"`
	OptnsGamma        float64 `json:"options_gamma"`
	OptnsDelta        float64 `json:"options_delta"`
	MrgnBal           float64 `json:"margin_balance"`
	MaintMrgn         float64 `json:"maintenance_margin"`
	InitMrgn          float64 `json:"initial_margin"`
	FuturesSessionUpl float64 `json:"futures_session_upl"`
	FuturesSessionRpl float64 `json:"futures_session_rpl"`
	FuturesPl         float64 `json:"futures_pl"`
	Equity            float64 `json:"equity"`
	DeltaTotal        float64 `json:"delta_total"`
	Ccy               string  `json:"currency"`
	Bal               float64 `json:"balance"`
	AvailableWdrFunds float64 `json:"available_withdrawal_funds"`
	AvailableFunds    float64 `json:"available_funds"`
}

type NtfctnQut

type NtfctnQut struct {
	TmStmp     int64   `json:"timestamp"`
	Instrument string  `json:"instrument_name"`
	BestBid    float64 `json:"best_bid_price"`
	BestBidAmt float64 `json:"best_bid_amount"`
	BestAsk    float64 `json:"best_ask_price"`
	BestAskAmt float64 `json:"best_ask_amount"`
}

type NtfctnTckr

type NtfctnTckr struct {
	TmStmp int64 `json:"timestamp"`
	Stats  struct {
		Volume float64 `json:"volume"`
		Low    float64 `json:"low"`
		High   float64 `json:"high"`
	} `json:"stats"`
	State          string  `json:"state"`
	SttlmntPrc     float64 `json:"settlement_price"`
	OpnIntrst      float64 `json:"open_interest"`
	MinPrc         float64 `json:"min_price"`
	MaxPrc         float64 `json:"max_price"`
	Mark           float64 `json:"mark_price"`
	Last           float64 `json:"last_price"`
	Instrument     string  `json:"instrument_name"`
	IndxPrc        float64 `json:"index_price"`
	Funding8H      float64 `json:"funding_8h"`
	CurrentFunding float64 `json:"current_funding"`
	BestBid        float64 `json:"best_bid_price"`
	BestBidAmt     float64 `json:"best_bid_amount"`
	BestAsk        float64 `json:"best_ask_price"`
	BestAskAmt     float64 `json:"best_ask_amount"`
}

type NtfctnTrades

type NtfctnTrades []Trade

type NtfctnUserChgs

type NtfctnUserChgs struct {
	Trades []UserTrade `json:"trades"`
	Pstns  []PosnOut   `json:"positions"`
	Orders []Order     `json:"orders"`
}

type NtfctnUserOrdr

type NtfctnUserOrdr []Order

type NtfctnUserTrades

type NtfctnUserTrades []UserTrade

type OpnOrdrsByCcyIn

type OpnOrdrsByCcyIn struct {
	Ccy  string `json:"currency"`
	Kind string `json:"kind,omitempty"`
	Type string `json:"type,omitempty"`
}

type OpnOrdrsByInstrmtIn

type OpnOrdrsByInstrmtIn struct {
	Instrument string `json:"instrument_name"`
	Type       string `json:"type,omitempty"`
	Label      string `json:"label,omitempy"`
}

type Order

type Order struct {
	Advanced      string  `json:"advanced,omitempty"`
	Amt           float64 `json:"amount"`
	API           bool    `json:"api"`
	AvgPrc        float64 `json:"average_price"`
	Commission    float64 `json:"commission"`
	CreatnTmStmp  int64   `json:"creation_timestamp"`
	Drctn         string  `json:"direction"`
	FilledAmt     float64 `json:"filled_amount"`
	Implv         float64 `json:"implv,omitempty"`
	Instrument    string  `json:"instrument_name"`
	IsLiquidation bool    `json:"is_liquidation"`
	Label         string  `json:"label"`
	LstUpdtTmStmp int64   `json:"last_update_timestamp"`
	OrderID       string  `json:"order_id"`
	OrderState    string  `json:"order_state"`
	OrderType     string  `json:"order_type"`
	MaxShow       float64 `json:"max_show"`
	PostOnly      bool    `json:"post_only"`
	Prc           Price   `json:"price"`
	ProfitLoss    float64 `json:"profit_loss"`
	RdcOnly       bool    `json:"reduce_only"`
	TmInFrc       string  `json:"time_in_force"`
	StopPrc       float64 `json:"stop_price,omitempty"`
	Triggered     bool    `json:"triggered,omitempty"`
	USD           float64 `json:"usd,omitempty"`
}

Order contains the information for a submitted order

type OrderIn

type OrderIn struct {
	Instrument string   `json:"instrument_name"`
	Amt        float64  `json:"amount"`
	Type       string   `json:"type,omitempty"`
	Label      string   `json:"label,omitempty"`
	Prc        float64  `json:"price,omitempty"`
	TmInFrc    string   `json:"time_in_force,omitempty"`
	MaxShow    *float64 `json:"max_show,omitempty"`
	PostOnly   bool     `json:"post_only,omitempty"`
	RdcOnly    bool     `json:"reduce_only,omitempty"`
	StopPrc    float64  `json:"stop_price,omitempty"`
	Trigger    string   `json:"trigger,omitempty"`
	Advanced   string   `json:"advanced,omitempty"`
}

type OrderOut

type OrderOut struct {
	Trades []Trade `json:"trades"`
	Order  Order   `json:"order"`
}

type Portfolio

type Portfolio struct {
	AvailableFunds    int    `json:"available_funds"`
	AvailableWdrFunds int    `json:"available_withdrawal_funds"`
	Bal               int    `json:"balance"`
	Ccy               string `json:"currency"`
	Equity            int    `json:"equity"`
	InitMrgn          int    `json:"initial_margin"`
	MntcMrgn          int    `json:"maintenance_margin"`
	MrgnBal           int    `json:"margin_balance"`
}

Portfolio contains portolio information

type PosnCcyIn

type PosnCcyIn struct {
	Ccy  string `json:"currency"`
	Kind string `json:"kind,omitempty"`
}

type PosnInstrmtIn

type PosnInstrmtIn struct {
	Instrument string `json:"instrument_name"`
}

type PosnOut

type PosnOut struct {
	AvgPrc       float64 `json:"average_price"`
	Delta        float64 `json:"delta"`
	Drctn        string  `json:"direction"`
	EstdLqdtnPrc float64 `json:"estimated_liquidation_price"`
	FltngPl      float64 `json:"floating_profit_loss"`
	IndxPrc      float64 `json:"index_price"`
	InitMrgn     float64 `json:"initial_margin"`
	Instrument   string  `json:"instrument_name"`
	Kind         string  `json:"kind"`
	Leverage     float64 `json:"leverage"`
	MaintMrgn    float64 `json:"maintenance_margin"`
	Mark         float64 `json:"mark_price"`
	OpnOrdrsMrgn float64 `json:"open_orders_margin"`
	RlzdPl       float64 `json:"realized_profit_loss"`
	StlmntPrc    float64 `json:"settlement_price"`
	Sz           float64 `json:"size"`
	SzCcy        float64 `json:"size_currency"`
	TotalPl      float64 `json:"total_profit_loss"`
}

type Price

type Price float64

func (*Price) ToFloat64

func (p *Price) ToFloat64() float64

func (*Price) UnmarshalJSON

func (p *Price) UnmarshalJSON(data []byte) (err error)

type RateLimits

type RateLimits struct {
	Futures           Rates `json:"futures,omitempty"`
	MatchingEngine    Rates `json:"matching_engine,omitempty"`
	NonMatchingEngine Rates `json:"non_matching_engine,omitempty"`
	Options           Rates `json:"options,omitempty"`
	Perpetuals        Rates `json:"perpetuals,omitempty"`
}

type Rates

type Rates struct {
	Burst int `json:"burst"`
	Rate  int `json:"rate"`
}

type StopOrder added in v1.2.0

type StopOrder struct {
	Trigger    string  `json:"trigger"`
	TmStmp     int64   `json:"timestamp"`
	StopPrice  float64 `json:"stop_price"`
	StopID     string  `json:"stop_id"`
	OrderState string  `json:"order_state"`
	Request    string  `json:"request"`
	Prc        float64 `json:"price"`
	OrderID    string  `json:"order_id"`
	Offset     int     `json:"offset"`
	Instrument string  `json:"instrument_name"`
	Amt        float64 `json:"amount"`
	Drctn      string  `json:"direction"`
}

StopOrder contains info for a submitted stop order

type StopOrderHistoryIn added in v1.2.0

type StopOrderHistoryIn struct {
	Ccy          string `json:"currency"`
	Instrument   string `json:"instrument_name,omitempty"`
	Count        int    `json:"count,omitempty"`
	Continuation string `json:"continuation,omitempty"`
}

StopOrderHistoryIn is the input parameter for GetStopOrderHistory

type StopOrderHistoryOut added in v1.2.0

type StopOrderHistoryOut struct {
	Continuation string      `json:"continuation"`
	Entries      []StopOrder `json:"entries"`
}

type SubscribeIn

type SubscribeIn struct {
	Channels []string `json:"channels"`
}

type SubscribeOut

type SubscribeOut []string

type TckrIn

type TckrIn struct {
	Instrument string `json:"instrument_name"`
}

type TckrOut

type TckrOut struct {
	BestAskAmt     float64   `json:"best_ask_amount"`
	BestAsk        float64   `json:"best_ask_price"`
	BestBidAmt     float64   `json:"best_bid_amount"`
	BestBid        float64   `json:"best_bid_price"`
	CurrentFunding float64   `json:"current_funding"`
	Funding8h      float64   `json:"funding_8h"`
	IndxPrc        float64   `json:"index_price"`
	Instrument     string    `json:"instrument_name"`
	Last           float64   `json:"last_price"`
	Mark           float64   `json:"mark_price"`
	MaxPrc         float64   `json:"max_price"`
	MinPrc         float64   `json:"min_price"`
	OpnIntrst      float64   `json:"open_interest"`
	StlmntPrc      float64   `json:"settlement_price"`
	State          string    `json:"state"`
	Stats          TckrStats `json:"stats"`
	TmStmp         int64     `json:"timestamp"`
}

type TckrStats

type TckrStats struct {
	Volume float64 `json:"volume"`
	Low    float64 `json:"low"`
	High   float64 `json:"high"`
}

type TestOut

type TestOut struct {
	Version string `json:"version"`
}

type Trade

type Trade struct {
	Amt         float64 `json:"amount"`
	Drctn       string  `json:"direction"`
	IndxPrc     float64 `json:"index_price"`
	Instrument  string  `json:"instrument_name"`
	IV          float64 `json:"iv"`
	Liquidation string  `json:"liquidation"`
	Prc         float64 `json:"price"`
	TckDrctn    int     `json:"tick_direction"`
	TmStmp      int64   `json:"timestamp"`
	TradeID     string  `json:"trade_id"`
	TrdSqnc     int     `json:"trade_seq"`
}

type TradesByCcyAndTmIn

type TradesByCcyAndTmIn struct {
	Ccy         string `json:"currency"`
	Kind        string `json:"kind,omitempty"`
	StartTmStmp int64  `json:"start_timestamp"`
	EndTmStmp   int64  `json:"end_timestamp"`
	Count       int    `json:"count,omitempty"`
	IncludeOld  bool   `json:"include_old,omitempty"`
	Sorting     string `json:"sorting,omitempty"`
}

type TradesByCcyIn

type TradesByCcyIn struct {
	Ccy        string `json:"currency"`
	Kind       string `json:"kind,omitempty"`
	StartId    int64  `json:"start_id,omitempty"`
	EndId      int64  `json:"end_id,omitempty"`
	Count      int    `json:"count,omitempty"`
	IncludeOld bool   `json:"include_old,omitempty"`
	Sorting    string `json:"sorting,omitempty"`
}

type TradesByInstrmtAndTmIn

type TradesByInstrmtAndTmIn struct {
	Instrument  string `json:"instrument_name"`
	StartTmStmp int64  `json:"start_timestamp"`
	EndTmStmp   int64  `json:"end_timestamp"`
	Count       int    `json:"count,omitempty"`
	IncludeOld  bool   `json:"include_old,omitempty"`
	Sorting     string `json:"sorting,omitempty"`
}

type TradesByInstrmtIn

type TradesByInstrmtIn struct {
	Instrument string `json:"instrument_name"`
	StartSeq   int64  `json:"start_seq,omitempty"`
	EndSeq     int64  `json:"end_seq,omitempty"`
	Count      int    `json:"count,omitempty"`
	IncludeOld bool   `json:"include_old,omitempty"`
	Sorting    string `json:"sorting,omitempty"`
}

type UserTrade

type UserTrade struct {
	Amt        float64     `json:"amount"`
	Drctn      string      `json:"direction"`
	Fee        float64     `json:"fee"`
	FeeCcy     string      `json:"fee_currency"`
	IndxPrc    float64     `json:"index_price"`
	Instrument string      `json:"instrument_name"`
	IV         string      `json:"iv"`
	Label      string      `json:"label"`
	Liquidity  string      `json:"liquidity"`
	MatchingID interface{} `json:"matching_id"`
	OrderID    string      `json:"order_id"`
	OrderType  string      `json:"order_type"`
	PostOnly   bool        `json:"post_only"`
	Prc        float64     `json:"price"`
	RdcOnly    bool        `json:"reduce_only"`
	SelfTrd    bool        `json:"self_trade"`
	State      string      `json:"state"`
	TckDrctn   int         `json:"tick_direction"`
	TmStmp     int64       `json:"timestamp"`
	TradeID    string      `json:"trade_id"`
	TrdSqnc    int         `json:"trade_seq"`
	UndPrc     float64     `json:"underlying_price"`
}

type UserTradesOut

type UserTradesOut struct {
	HasMore bool        `json:"has_more"`
	Trades  []UserTrade `json:"trades"`
}

type WithdrawalPriority

type WithdrawalPriority struct {
	Name  string  `json:"name"`
	Value float64 `json:"value"`
}

type XferSubAcctIn

type XferSubAcctIn struct {
	Amt string `json:"amount"`
	Ccy string `json:"currency"`
	Dst int    `json:"destination"`
}

XferSubAcctIn is the argument struct for the inputs to posting a request for a transfer between (sub) accounts

type XferSubAcctOut

type XferSubAcctOut struct {
	Amt           float64 `json:"amount"`
	CreatedTmStmp int64   `json:"created_timestamp"`
	Currency      string  `json:"currency"`
	Direction     string  `json:"direction"`
	ID            int     `json:"id"`
	OtherSide     string  `json:"other_side"`
	State         string  `json:"state"`
	Type          string  `json:"type"`
	UpdatedTmStmp int64   `json:"updated_timestamp"`
}

XferSubAcctOut is the struct containing the result form a transfer request

Jump to

Keyboard shortcuts

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