response

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BKPaginate added in v1.4.0

type BKPaginate struct {
	Page int `json:"page"`
	Last int `json:"last"`
	Next int `json:"next"`
	Prev int `json:"prev"`
}

type BalanceMapResult added in v1.4.0

type BalanceMapResult struct {
	Available float64 `json:"available"`
	Reserved  float64 `json:"reserved"`
}

type BalanceResult

type BalanceResult map[string]BalanceMapResult

type Balances added in v1.2.0

type Balances struct {
	Error  int           `json:"error"`
	Result BalanceResult `json:"result"`
}

type CancelOrder

type CancelOrder struct {
	Error int `json:"error"`
}

type CryptoAddresses added in v1.1.0

type CryptoAddresses struct {
	Error      int                     `json:"error"`
	Result     []CryptoAddressesResult `json:"result"`
	Pagination BKPaginate              `json:"pagination"`
}

type CryptoAddressesResult added in v1.4.0

type CryptoAddressesResult struct {
	Currency string `json:"currency"`
	Address  string `json:"address"`
	Tag      int    `json:"tag"`
	Time     int    `json:"time"`
}

type CryptoGenerateAddress added in v1.1.0

type CryptoGenerateAddress struct {
	Error  int                           `json:"error"`
	Result []CryptoGenerateAddressResult `json:"result"`
}

type CryptoGenerateAddressResult added in v1.4.0

type CryptoGenerateAddressResult struct {
	Currency string `json:"currency"`
	Address  string `json:"address"`
	Memo     string `json:"memo"`
}

type CryptoWithdraw added in v1.1.0

type CryptoWithdraw struct {
	Error  int                  `json:"error"`
	Result CryptoWithdrawResult `json:"result"`
}

type CryptoWithdrawResult added in v1.4.0

type CryptoWithdrawResult struct {
	Txn string  `json:"txn"`
	Adr string  `json:"adr"`
	Mem string  `json:"mem"`
	Cur string  `json:"cur"`
	Amt float64 `json:"amt"`
	Fee float64 `json:"fee"`
	Ts  int     `json:"ts"`
}

type DepositHistory

type DepositHistory struct {
	Error      int                    `json:"error"`
	Result     []DepositHistoryResult `json:"result"`
	Pagination BKPaginate             `json:"pagination"`
}

type DepositHistoryResult added in v1.4.0

type DepositHistoryResult struct {
	Hash          string  `json:"hash"`
	Currency      string  `json:"currency"`
	Amount        float64 `json:"amount"`
	FromAddress   string  `json:"from_address"`
	ToAddress     string  `json:"to_address"`
	Confirmations int     `json:"confirmations"`
	Status        string  `json:"status"`
	Time          int     `json:"time"`
}

type FiatAccounts added in v1.2.0

type FiatAccounts struct {
	Error      int                  `json:"error"`
	Result     []FiatAccountsResult `json:"result"`
	Pagination BKPaginate           `json:"pagination"`
}

type FiatAccountsResult added in v1.4.0

type FiatAccountsResult struct {
	ID   string `json:"id"`
	Bank string `json:"bank"`
	Name string `json:"name"`
	Time int    `json:"time"`
}

type FiatDepositHistory added in v1.2.0

type FiatDepositHistory struct {
	Error      int                        `json:"error"`
	Result     []FiatDepositHistoryResult `json:"result"`
	Pagination BKPaginate                 `json:"pagination"`
}

type FiatDepositHistoryResult added in v1.4.0

type FiatDepositHistoryResult struct {
	TxnID    string  `json:"txn_id"`
	Currency string  `json:"currency"`
	Amount   float64 `json:"amount"`
	Status   string  `json:"status"`
	Time     int     `json:"time"`
}

type FiatWithdraw added in v1.2.0

type FiatWithdraw struct {
	Error  int                `json:"error"`
	Result FiatWithdrawResult `json:"result"`
}

type FiatWithdrawHistory added in v1.2.0

type FiatWithdrawHistory struct {
	Error      int                         `json:"error"`
	Result     []FiatWithdrawHistoryResult `json:"result"`
	Pagination BKPaginate                  `json:"pagination"`
}

type FiatWithdrawHistoryResult added in v1.4.0

type FiatWithdrawHistoryResult struct {
	TxnID    string `json:"txn_id"`
	Currency string `json:"currency"`
	Amount   string `json:"amount"`
	Fee      int    `json:"fee"`
	Status   string `json:"status"`
	Time     int    `json:"time"`
}

type FiatWithdrawResult added in v1.4.0

type FiatWithdrawResult struct {
	Txn string `json:"txn"`
	Acc string `json:"acc"`
	Cur string `json:"cur"`
	Amt int    `json:"amt"`
	Fee int    `json:"fee"`
	Rec int    `json:"rec"`
	Ts  int    `json:"ts"`
}

type InternalWithdraw

type InternalWithdraw struct {
	Error  int                    `json:"error"`
	Result InternalWithdrawResult `json:"result"`
}

type InternalWithdrawResult added in v1.4.0

type InternalWithdrawResult struct {
	Txn string  `json:"txn"`
	Adr string  `json:"adr"`
	Mem string  `json:"mem"`
	Cur string  `json:"cur"`
	Amt float64 `json:"amt"`
	Fee float64 `json:"fee"`
	Ts  int     `json:"ts"`
}

type Limits

type Limits struct {
	Error  int          `json:"error"`
	Result LimitsResult `json:"result"`
}

type LimitsResult added in v1.4.0

type LimitsResult struct {
	Limits struct {
		Crypto struct {
			Deposit  float64 `json:"deposit"`
			Withdraw float64 `json:"withdraw"`
		} `json:"crypto"`
		Fiat struct {
			Deposit  float32 `json:"deposit"`
			Withdraw float32 `json:"withdraw"`
		} `json:"fiat"`
	} `json:"limits"`
	Usage struct {
		Crypto struct {
			Deposit               float64 `json:"deposit"`
			Withdraw              float64 `json:"withdraw"`
			DepositPercentage     float64 `json:"deposit_percentage"`
			WithdrawPercentage    float64 `json:"withdraw_percentage"`
			DepositThbEquivalent  float64 `json:"deposit_thb_equivalent"`
			WithdrawThbEquivalent float64 `json:"withdraw_thb_equivalent"`
		} `json:"crypto"`
		Fiat struct {
			Deposit            float32 `json:"deposit"`
			Withdraw           float32 `json:"withdraw"`
			DepositPercentage  float32 `json:"deposit_percentage"`
			WithdrawPercentage float32 `json:"withdraw_percentage"`
		} `json:"fiat"`
	} `json:"usage"`
	Rate float32 `json:"rate"`
}

type MarketAsks

type MarketAsks struct {
	Error  int          `json:"error"`
	Result MarketResult `json:"result"`
}

/api/market/asks

type MarketBids

type MarketBids struct {
	Error  int          `json:"error"`
	Result MarketResult `json:"result"`
}

/api/market/bids

type MarketBooks

type MarketBooks struct {
	Error  int               `json:"error"`
	Result MarketBooksResult `json:"result"`
}

/api/market/books

type MarketBooksResult added in v1.4.0

type MarketBooksResult struct {
	Bids [][5]any `json:"bids"`
	Asks [][5]any `json:"asks"`
}

type MarketDepth

type MarketDepth struct {
	Asks [][]float64 `json:"asks"`
	Bids [][]float64 `json:"bids"`
}

/api/market/depth

type MarketResult added in v1.4.0

type MarketResult [][5]any

type MarketSymbols

type MarketSymbols struct {
	Error  int                   `json:"error"`
	Result []MarketSymbolsResult `json:"result"`
}

/api/market/symbols

type MarketSymbolsResult added in v1.4.0

type MarketSymbolsResult struct {
	ID     int    `json:"id"`
	Symbol string `json:"symbol"`
	Info   string `json:"info"`
}

type MarketTickerData added in v1.4.1

type MarketTickerData struct {
	ID            int     `json:"id"`
	Last          float64 `json:"last"`
	LowestAsk     float64 `json:"lowestAsk"`
	HighestBid    float64 `json:"highestBid"`
	PercentChange float64 `json:"percentChange"`
	BaseVolume    float64 `json:"baseVolume"`
	QuoteVolume   float64 `json:"quoteVolume"`
	IsFrozen      int     `json:"isFrozen"`
	High24Hr      float64 `json:"high24hr"`
	Low24Hr       float64 `json:"low24hr"`
}

/api/market/ticker

type MarketTrades

type MarketTrades struct {
	Error  int                `json:"error"`
	Result MarketTradesResult `json:"result"`
}

/api/market/trades

type MarketTradesResult added in v1.4.0

type MarketTradesResult [][4]any

type MyOpenOrder

type MyOpenOrder struct {
	Error  int                 `json:"error"`
	Result []MyOpenOrderResult `json:"result"`
}

/api/v3/market/my-open-orders

type MyOpenOrderResult added in v1.4.0

type MyOpenOrderResult struct {
	ID       string  `json:"id"`
	Hash     string  `json:"hash"`
	Side     string  `json:"side"`
	Type     string  `json:"type"`
	Rate     int     `json:"rate"`
	Fee      float64 `json:"fee"`
	Credit   float64 `json:"credit"`
	Amount   float64 `json:"amount"`
	Receive  int     `json:"receive"`
	ParentID int     `json:"parent_id"`
	SuperID  int     `json:"super_id"`
	ClientID string  `json:"client_id"`
	Ts       int     `json:"ts"`
}

type MyOrderHistory

type MyOrderHistory struct {
	Error      int                    `json:"error"`
	Result     []MyOrderHistoryResult `json:"result"`
	Pagination BKPaginate             `json:"pagination"`
}

/api/v3/market/my-order-history

type MyOrderHistoryResult added in v1.4.0

type MyOrderHistoryResult struct {
	TxnID         string `json:"txn_id"`
	OrderID       string `json:"order_id"`
	Hash          string `json:"hash"`
	ParentOrderID string `json:"parent_order_id"`
	SuperOrderID  string `json:"super_order_id"`
	TakenByMe     bool   `json:"taken_by_me"`
	IsMaker       bool   `json:"is_maker"`
	Side          string `json:"side"`
	Type          string `json:"type"`
	Rate          string `json:"rate"`
	Fee           string `json:"fee"`
	Credit        string `json:"credit"`
	Amount        string `json:"amount"`
	Ts            int    `json:"ts"`
}

type OrderInfo

type OrderInfo struct {
	Error  int             `json:"error"`
	Result OrderInfoResult `json:"result"`
}

/api/v3/market/order-info

type OrderInfoResult added in v1.4.0

type OrderInfoResult struct {
	ID            string                   `json:"id"`
	First         string                   `json:"first"`
	Parent        string                   `json:"parent"`
	Last          string                   `json:"last"`
	Amount        string                   `json:"amount"`
	Rate          int                      `json:"rate"`
	Fee           int                      `json:"fee"`
	Credit        int                      `json:"credit"`
	Filled        float64                  `json:"filled"`
	Total         int                      `json:"total"`
	Status        string                   `json:"status"`
	PartialFilled bool                     `json:"partial_filled"`
	Remaining     int                      `json:"remaining"`
	History       []OrderInfoResultHistory `json:"history"`
}

type OrderInfoResultHistory added in v1.4.0

type OrderInfoResultHistory struct {
	Amount    float64 `json:"amount"`
	Credit    float64 `json:"credit"`
	Fee       float64 `json:"fee"`
	Hash      string  `json:"hash"`
	ID        string  `json:"id"`
	Rate      int     `json:"rate"`
	Timestamp int64   `json:"timestamp"`
	TxnID     string  `json:"txn_id"`
}

type PlaceAsk

type PlaceAsk struct {
	Error  int            `json:"error"`
	Result PlaceAskResult `json:"result"`
}

type PlaceAskResult added in v1.4.0

type PlaceAskResult struct {
	ID   string  `json:"id"`
	Hash string  `json:"hash"`
	Typ  string  `json:"typ"`
	Amt  float64 `json:"amt"`
	Rat  int     `json:"rat"`
	Fee  float64 `json:"fee"`
	Cre  float64 `json:"cre"`
	Rec  int     `json:"rec"`
	Ts   int     `json:"ts"`
	Ci   string  `json:"ci"`
}

type PlaceBid

type PlaceBid struct {
	Error  int            `json:"error"`
	Result PlaceBidResult `json:"result"`
}

type PlaceBidResult added in v1.4.0

type PlaceBidResult struct {
	ID   string  `json:"id"`
	Hash string  `json:"hash"`
	Typ  string  `json:"typ"`
	Amt  int     `json:"amt"`
	Rat  int     `json:"rat"`
	Fee  float64 `json:"fee"`
	Cre  float64 `json:"cre"`
	Rec  float64 `json:"rec"`
	Ts   int     `json:"ts"`
	Ci   string  `json:"ci"`
}

type Status

type Status []struct {
	Name    string `json:"name"`
	Status  string `json:"status"`
	Message string `json:"message"`
}

/api/status

type TradingCredit

type TradingCredit struct {
	Error  int     `json:"error"`
	Result float64 `json:"result"`
}

type TradingviewHistory

type TradingviewHistory struct {
	C []float64 `json:"c"`
	H []float64 `json:"h"`
	L []float64 `json:"l"`
	O []float64 `json:"o"`
	S string    `json:"s"`
	T []int     `json:"t"`
	V []float64 `json:"v"`
}

/tradingview/history

type Wallet

type Wallet struct {
	Error  int          `json:"error"`
	Result WalletResult `json:"result"`
}

type WalletResult

type WalletResult struct {
	Thb float64 `json:"THB"`
	Btc float64 `json:"BTC"`
	Eth float64 `json:"ETH"`
}

type WithdrawHistory

type WithdrawHistory struct {
	Error      int                     `json:"error"`
	Result     []WithdrawHistoryResult `json:"result"`
	Pagination BKPaginate              `json:"pagination"`
}

type WithdrawHistoryResult added in v1.4.0

type WithdrawHistoryResult struct {
	TxnID    string  `json:"txn_id"`
	Hash     string  `json:"hash"`
	Currency string  `json:"currency"`
	Amount   string  `json:"amount"`
	Fee      float64 `json:"fee"`
	Address  string  `json:"address"`
	Status   string  `json:"status"`
	Time     int     `json:"time"`
}

type WsTicker added in v1.3.0

type WsTicker struct {
	Stream         string  `json:"stream"`
	ID             int     `json:"id"`
	Last           float64 `json:"last"`
	LowestAsk      float64 `json:"lowestAsk"`
	LowestAskSize  float64 `json:"lowestAskSize"`
	HighestBid     float64 `json:"highestBid"`
	HighestBidSize float64 `json:"highestBidSize"`
	Change         float64 `json:"change"`
	PercentChange  float64 `json:"percentChange"`
	BaseVolume     float64 `json:"baseVolume"`
	QuoteVolume    float64 `json:"quoteVolume"`
	IsFrozen       int     `json:"isFrozen"`
	High24Hr       float64 `json:"high24hr"`
	Low24Hr        float64 `json:"low24hr"`
	Open           float64 `json:"open"`
	Close          float64 `json:"close"`
}

type WsToken

type WsToken struct {
	Error  int    `json:"error"`
	Result string `json:"result"`
}

type WsTrade added in v1.3.0

type WsTrade struct {
	Amt    float64 `json:"amt"`
	Bid    string  `json:"bid"`
	Rat    float64 `json:"rat"`
	Sid    string  `json:"sid"`
	Stream string  `json:"stream"`
	Sym    string  `json:"sym"`
	Ts     int     `json:"ts"`
	Txn    string  `json:"txn"`
}

websocket response

Jump to

Keyboard shortcuts

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