Documentation ¶
Index ¶
- Constants
- Variables
- type APIError
- type APIResponseError
- type BalancesPayload
- type BalancesProps
- type BalancesResponse
- type BalancesResponseAny
- type BalancesResult
- type BaseRequestPayload
- type BidsAsksResponse
- type BitKubAPIError
- type BlockChainNetwork
- type CancelOrderPayload
- type CancelOrderResponse
- type CryptoAddressesPayload
- type CryptoAddressesResponse
- type CryptoAddressesResponseWithAllQuery
- type CryptoGenerateAddressPayload
- type CryptoGenerateAddressResponse
- type CryptoInternalWidthdrawPayload
- type CryptoWithdrawPayload
- type CryptoWithdrawResponse
- type EndPointType
- type FiatAccountPayload
- type FiatAccountsResponse
- type FiatWithdrawPayload
- type FiatWithdrawResponse
- type GetCryptoDepositPayload
- type GetCryptoDepositResponse
- type GetCryptoWithdrawPayload
- type GetCryptoWithdrawResponse
- type GetFiatDepositsPayload
- type GetFiatDepositsResponse
- type GetFiatWithdrawsPayload
- type GetFiatWithdrawsResponse
- type GetOpenOrdersPayload
- type GetOpenOrdersResponse
- type GetOrderHistoryPayload
- type GetOrderHistoryResponse
- type GetOrdersInfoPayload
- type GetOrdersInfoResponse
- type GetTradingCreditsPayload
- type GetTradingCreditsResponse
- type GetUserLimitsPayload
- type GetUserLimitsResponse
- type GetWsTokenPayload
- type GetWsTokenResponse
- type MarketDepthResponse
- type OpenBooksResponse
- type OrderHash
- type OrderID
- type OrderSide
- type OrderType
- type PlaceBidAskPayload
- type PlaceBidAskResponse
- type ServerStatus
- type ServerStatusArray
- type Signature
- type Symbol
- type SymbolsResponse
- type TickerProperty
- type TickerResponse
- type TickerResponseAny
- type TimeResolution
- type Timestamp
- type TradesResponse
- type TradingViewHistoryResponse
- type WalletResponse
- type WalletResponseAny
- type WalletResult
Constants ¶
View Source
const ( X_btk_apikey = "X-BTK-APIKEY" BaseAPIMainURL = "https://api.bitkub.com" OrderTypeLimit OrderType = "LIMIT" OrderTypeMarket OrderType = "MARKET" OrderSideBuy OrderSide = "buy" OrderSideSell OrderSide = "sell" )
Variables ¶
View Source
var ( ErrSymbolMandatory = errors.New("symbol is mandatory") ErrAmountMandatory = errors.New("amount is mandatory") ErrAmountMustBePositive = errors.New("amount must be positive") ErrRateMandatory = errors.New("rate is mandatory") ErrOrderTypeMandatory = errors.New("order type is mandatory") ErrPageMustBePositive = errors.New("page must be positive") ErrLimitMustBePositive = errors.New("limit must be positive") ErrCurrencyMandatory = errors.New("currency is mandatory") ErrAddressMandatory = errors.New("address is mandatory") ErrNetworkMandatory = errors.New("network is mandatory") ErrFiatAccIDMandatory = errors.New("fiat account id is mandatory") ErrInvalidOrderSide = errors.New("invalid order side") ErrOrderIDMandatory = errors.New("order id is mandatory") ErrInvalidTimeStamp = errors.New("invalid timestamp") )
View Source
var BitkubAPIErrors = map[BitKubAPIError]string{ APINoError: "No Error", APIInvalidJSON: "Invalid JSON payload", APIMissingAPIKey: "Missing X-BTK-APIKEY", APIInvalidAPIKey: "Invalid API key", APIPendingForActivation: "API pending for activation", APIIpNotAllowed: "IP not allowed", APIInvalidSignature: "Missing / Invalid signature", APIMissingTimeStamp: "Missing timestamp", APIInvalidTimeStamp: "Invalid timestamp", APIInvalidUser: "Invalid user", APIInvalidParamiter: "Invalid parameter", APIInvalidSymbol: "Invalid symbol", APIInvalidAmount: "Invalid amount", APIInvalidPrice: "Invalid price", APIImproperRate: "Improper rate", APIAmountTooLow: "Amount too low", APIFailedToGetBalance: "Failed to get balance", APIEmptyWallet: "Wallet is empty", APIInsufficientBalance: "Insufficient balance", APIInsertOrderFailed: "Failed to insert order into db", APIDeductBalanceFailed: "Failed to deduct balance", APIInvalidOrderForCancellation: "Invalid order for cancellation", APIInvalidSide: "Invalid side", APIUpdateOrderStatusFailed: "Failed to update order status", APIInvalidOrderForLookup: "Invalid order for lookup", APIKYCRequired: "KYC level 1 is required to proceed", APILimitExceeded: "Limit exceeded", APIPendingWidrawalExists: "Pending withdrawal exists", APIInvalidCurrencyForWithdrawal: "Invalid currency for withdrawal", APIAddressIsNotWhitelisted: "Address is not whitelisted", APIDeductCryptoFailed: "Failed to deduct crypto", APICreateWidthdrawalRecordFailed: "Failed to create withdrawal record", APINonceHasToBeNumeric: "Nonce has to be numeric", APIInvalidNonce: "Invalid nonce", APIWithdrawalLimitExceeded: "Withdrawal limit exceeded", APIInvalidBankAccount: "Invalid bank account", APIBankLimitExceeded: "Bank limit exceeded", APIPendingWitdrawalExists: "Pending withdrawal exists", APIWitdrawalUnderMaintenance: "Withdrawal is under maintenance", APIInvalidPermission: "Invalid permission", APIInvalidInternalAddress: "Invalid internal address", APIAddressDepreciated: "Address has been depreciated", APICancelOnlyMode: "Cancel only mode", APIUserSuspendedFromPurchasing: "User has been suspended from purchasing", APIUserSuspendedFromSelling: "User has been suspended from selling", APIServerError: "Server error", }
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct { ErrorID BitKubAPIError `json:"error"` ErrorDesc string `json:"error_description"` }
type APIResponseError ¶
type APIResponseError struct {
Error BitKubAPIError `json:"error"`
}
type BalancesPayload ¶
type BalancesProps ¶
type BalancesResponse ¶
type BalancesResponse struct { Error int `json:"error"` Result BalancesResult `json:"result"` }
type BalancesResponseAny ¶
type BalancesResponseAny struct { Error int `json:"error"` Result map[string]BalancesProps `json:"result"` }
func (*BalancesResponseAny) Compile ¶
func (b *BalancesResponseAny) Compile() *BalancesResponse
type BalancesResult ¶
type BalancesResult struct { THB BalancesProps `json:"THB"` BTC BalancesProps `json:"BTC"` ETH BalancesProps `json:"ETH"` WAN BalancesProps `json:"WAN"` ADA BalancesProps `json:"ADA"` OMG BalancesProps `json:"OMG"` BCH BalancesProps `json:"BCH"` USDT BalancesProps `json:"USDT"` XRP BalancesProps `json:"XRP"` ZIL BalancesProps `json:"ZIL"` SNT BalancesProps `json:"SNT"` CVC BalancesProps `json:"CVC"` LINK BalancesProps `json:"LINK"` IOST BalancesProps `json:"IOST"` ZRX BalancesProps `json:"ZRX"` KNC BalancesProps `json:"KNC"` ABT BalancesProps `json:"ABT"` MANA BalancesProps `json:"MANA"` CTXC BalancesProps `json:"CTXC"` XLM BalancesProps `json:"XLM"` SIX BalancesProps `json:"SIX"` JFIN BalancesProps `json:"JFIN"` BNB BalancesProps `json:"BNB"` POW BalancesProps `json:"POW"` DOGE BalancesProps `json:"DOGE"` DAI BalancesProps `json:"DAI"` BAND BalancesProps `json:"BAND"` KSM BalancesProps `json:"KSM"` DOT BalancesProps `json:"DOT"` USDC BalancesProps `json:"USDC"` BAT BalancesProps `json:"BAT"` NEAR BalancesProps `json:"NEAR"` SCRT BalancesProps `json:"SCRT"` GLM BalancesProps `json:"GLM"` YFI BalancesProps `json:"YFI"` UNI BalancesProps `json:"UNI"` COMP BalancesProps `json:"COMP"` MKR BalancesProps `json:"MKR"` DON BalancesProps `json:"DON"` AAVE BalancesProps `json:"AAVE"` KUB BalancesProps `json:"KUB"` ENJ BalancesProps `json:"ENJ"` ALPHA BalancesProps `json:"ALPHA"` BAL BalancesProps `json:"BAL"` CRV BalancesProps `json:"CRV"` AXS BalancesProps `json:"AXS"` SAND BalancesProps `json:"SAND"` SUSHI BalancesProps `json:"SUSHI"` }
type BaseRequestPayload ¶
type BidsAsksResponse ¶
type BidsAsksResponse struct { Error int `json:"error"` Result [][]interface{} `json:"result"` }
type BitKubAPIError ¶
type BitKubAPIError int //
const ( APINoError BitKubAPIError = iota APIInvalidJSON APIMissingAPIKey APIInvalidAPIKey APIPendingForActivation APIIpNotAllowed APIInvalidSignature APIMissingTimeStamp APIInvalidTimeStamp APIInvalidUser APIInvalidParamiter APIInvalidSymbol APIInvalidAmount APIInvalidPrice APIImproperRate APIAmountTooLow APIFailedToGetBalance APIEmptyWallet APIInsufficientBalance APIInsertOrderFailed APIDeductBalanceFailed APIInvalidOrderForCancellation APIInvalidSide APIUpdateOrderStatusFailed APIInvalidOrderForLookup APIKYCRequired APILimitExceeded BitKubAPIError = 30 APIPendingWidrawalExists BitKubAPIError = iota + 13 APIInvalidCurrencyForWithdrawal APIAddressIsNotWhitelisted APIDeductCryptoFailed APICreateWidthdrawalRecordFailed APINonceHasToBeNumeric APIInvalidNonce APIWithdrawalLimitExceeded APIInvalidBankAccount APIBankLimitExceeded APIPendingWitdrawalExists APIWitdrawalUnderMaintenance APIInvalidPermission APIInvalidInternalAddress APIAddressDepreciated APICancelOnlyMode APIUserSuspendedFromPurchasing APIUserSuspendedFromSelling APIServerError = 90 )
type BlockChainNetwork ¶
type BlockChainNetwork string
type CancelOrderPayload ¶
type CancelOrderResponse ¶
type CancelOrderResponse struct {
Error int `json:"error"`
}
type CryptoAddressesPayload ¶
type CryptoAddressesResponse ¶
type CryptoAddressesResponse struct { Error int `json:"error"` Result []struct { Currency string `json:"currency"` Address string `json:"address"` Tag string `json:"tag"` Time int `json:"time"` Network string `json:"network,omitempty"` } `json:"result"` Pagination struct { Page int `json:"page,omitempty"` Last int `json:"last"` Next int `json:"next"` Prev int `json:"prev"` } `json:"pagination"` }
In some Response behavior of pagination, it's not the same as the documentation. and not consistent. All Response that have pagination, Will have all Possible keys.
type CryptoAddressesResponseWithAllQuery ¶
type CryptoAddressesResponseWithAllQuery struct { Error int `json:"error"` Result []struct { Currency string `json:"currency"` Address string `json:"address"` Tag string `json:"tag"` Time int `json:"time"` Network string `json:"network,omitempty"` } `json:"result"` Pagination struct { Page string `json:"page,omitempty"` Last int `json:"last"` Next int `json:"next"` Prev int `json:"prev"` } `json:"pagination"` }
type CryptoWithdrawPayload ¶
type CryptoWithdrawPayload struct { TS Timestamp `json:"ts,omitempty"` Sig Signature `json:"sig,omitempty"` Cur string `json:"cur,omitempty"` Amount float64 `json:"amt,omitempty"` Address string `json:"adr,omitempty"` Memo string `json:"mem,omitempty"` Network BlockChainNetwork `json:"net,omitempty"` }
type CryptoWithdrawResponse ¶
type EndPointType ¶
type EndPointType string
const ( /* Non-secure endpoints */ StatusEndpoint EndPointType = "/api/status" ServertimeEndpoint EndPointType = "/api/servertime" MarketSymbolsEndpoint EndPointType = "/api/market/symbols" MarketTickerEndpoint EndPointType = "/api/market/ticker" MarketTradesEndpoint EndPointType = "/api/market/trades" MarketBidsEndpoint EndPointType = "/api/market/bids" MarketAsksEndpoint EndPointType = "/api/market/asks" MarketBooksEndpoint EndPointType = "/api/market/books" MarketDepthEndpoint EndPointType = "/api/market/depth" TradingviewHistoryEndpoint EndPointType = "/tradingview/history" /* Secure endpoints */ MarketWalletEndpoint EndPointType = "/api/market/wallet" MarketBalancesEndpoint EndPointType = "/api/market/balances" MarketPlaceBidEndpoint EndPointType = "/api/market/place-bid" MarketPlaceAskEndpoint EndPointType = "/api/market/place-ask" MarketPlaceAskByFiatEndpoint EndPointType = "/api/market/place-ask-by-fiat" MarketCancelOrderEndpoint EndPointType = "/api/market/cancel-order" MarketMyOpenOrdersEndpoint EndPointType = "/api/market/my-open-orders" MarketMyOrderHistoryEndpoint EndPointType = "/api/market/my-order-history" MarketOrderInfoEndpoint EndPointType = "/api/market/order-info" CryptoAddressesEndpoint EndPointType = "/api/crypto/addresses" CryptoWithdrawEndpoint EndPointType = "/api/crypto/withdraw" CryptoInternalWidrawEndpoint EndPointType = "/api/crypto/internal-withdraw" CryptoDepositHistoryEndpoint EndPointType = "/api/crypto/deposit-history" CryptoWithdrawHistoryEndpoint EndPointType = "/api/crypto/withdraw-history" CryptoGeneratreAddress EndPointType = "/api/crypto/generate-address" FiatAccountsEndpoint EndPointType = "/api/fiat/accounts" FiatWithdrawEndpoint EndPointType = "/api/fiat/withdraw" FiatDepositHistoryEndpoint EndPointType = "/api/fiat/deposit-history" FiatWithdrawHistoryEndpoint EndPointType = "/api/fiat/withdraw-history" MarketWstokenEndpoint EndPointType = "/api/market/wstoken" UserLimitsEndpoint EndPointType = "/api/user/limits" UserTradingCredits EndPointType = "/api/user/trading-credits" MarketPlaceBidEndpointV2 EndPointType = "/api/market/v2/place-bid" MarketPlaceAskEndpointV2 EndPointType = "/api/market/v2/place-ask" MarketPCancelOrderEndpointV2 EndPointType = "/api/market/v2/cancel-order" PlaceBidTestEndpoint EndPointType = "/api/market/place-bid/test" PlaceAskTestEndpoint EndPointType = "/api/market/place-ask/test" )
func NewEndPoint ¶
func NewEndPoint(endpoint string) EndPointType
func (EndPointType) String ¶
func (e EndPointType) String() string
type FiatAccountPayload ¶
type FiatAccountsResponse ¶
type FiatAccountsResponse struct { Error int `json:"error"` Result []struct { ID string `json:"id"` Bank string `json:"bank"` Name string `json:"name"` Time int `json:"time"` } `json:"result"` Pagination struct { Page int `json:"page,omitempty"` Last int `json:"last"` Next int `json:"next"` Prev int `json:"prev"` } `json:"pagination"` }
type FiatWithdrawPayload ¶
type FiatWithdrawResponse ¶
type GetCryptoDepositPayload ¶
type GetCryptoDepositResponse ¶
type GetCryptoDepositResponse struct { Error int `json:"error"` Result []struct { Hash string `json:"hash"` Currency string `json:"currency"` Amount float64 `json:"amount"` Address interface{} `json:"address"` Confirmations int `json:"confirmations"` Status string `json:"status"` Note interface{} `json:"note"` Time int `json:"time"` } `json:"result"` Pagination struct { Page int `json:"page,omitempty"` Last int `json:"last"` Next int `json:"next"` Prev int `json:"prev"` } `json:"pagination"` }
type GetCryptoWithdrawResponse ¶
type GetCryptoWithdrawResponse struct { Error int `json:"error"` Result []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"` Memo string `json:"memo"` Status string `json:"status"` Note string `json:"note"` Time int `json:"time"` } `json:"result"` Pagination struct { Page int `json:"page,omitempty"` Last int `json:"last"` Next int `json:"next"` Prev int `json:"prev"` } `json:"pagination"` }
type GetFiatDepositsPayload ¶
type GetFiatDepositsResponse ¶
type GetFiatDepositsResponse struct { Error int `json:"error"` Result []struct { TxnID string `json:"txn_id"` Currency string `json:"currency"` Amount float64 `json:"amount"` Status string `json:"status"` Time int `json:"time"` } `json:"result"` Pagination struct { Page int `json:"page,omitempty"` Last int `json:"last"` Next int `json:"next"` Prev int `json:"prev"` } `json:"pagination"` }
type GetFiatWithdrawsPayload ¶
type GetFiatWithdrawsResponse ¶
type GetFiatWithdrawsResponse struct { Error int `json:"error"` Result []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"` } `json:"result"` Pagination struct { Page int `json:"page"` Last int `json:"last"` } `json:"pagination"` }
type GetOpenOrdersPayload ¶
type GetOpenOrdersResponse ¶
type GetOpenOrdersResponse struct { Error int `json:"error"` Result []struct { ID string `json:"id"` Hash string `json:"hash"` Side string `json:"side"` Type string `json:"type"` Rate float64 `json:"rate"` Fee float64 `json:"fee"` Credit float64 `json:"credit"` Amount float64 `json:"amount"` Receive float64 `` /* 206-byte string literal not displayed */ ParentID string `json:"parent_id"` SuperID string `json:"super_id"` ClientID string `json:"client_id"` TS int `json:"ts"` } `json:"result"` }
type GetOrderHistoryPayload ¶
type GetOrderHistoryResponse ¶
type GetOrderHistoryResponse struct { Error int `json:"error"` Result []struct { TxnID string `json:"txn_id"` OrderID string `json:"order_id"` Hash string `json:"hash"` ParentOrderID string `json:"parent_order_id"` ParentOrderHash string `json:"parent_order_hash"` SuperOrderID string `json:"super_order_id"` SuperOrderHash string `json:"super_order_hash"` 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"` Date string `json:"date"` } `json:"result"` Pagination struct { Page int `json:"page,omitempty"` Last int `json:"last"` Next int `json:"next"` Prev int `json:"prev"` } `json:"pagination"` }
type GetOrdersInfoPayload ¶
type GetOrdersInfoResponse ¶
type GetOrdersInfoResponse struct { Error int `json:"error"` Result struct { Amount int `json:"amount"` ClientID string `json:"client_id"` Credit int `json:"credit"` Fee float64 `json:"fee"` Filled int `json:"filled"` First string `json:"first"` History []struct { Amount int `json:"amount"` Credit int `json:"credit"` Fee float64 `json:"fee"` Hash string `json:"hash"` ID string `json:"id"` Rate int `json:"rate"` Timestamp int `json:"timestamp"` TxnID string `json:"txn_id"` } `json:"history"` ID string `json:"id"` Last string `json:"last"` Parent string `json:"parent"` PartialFilled bool `json:"partial_filled"` Rate float64 `json:"rate"` Remaining float64 `json:"remaining"` Side string `json:"side"` Status string `json:"status"` Total int `json:"total"` } `json:"result"` }
type GetUserLimitsPayload ¶
type GetUserLimitsResponse ¶
type GetUserLimitsResponse struct { Error int `json:"error"` Result struct { Limits struct { Crypto struct { Deposit float64 `json:"deposit"` Withdraw float64 `json:"withdraw"` } `json:"crypto"` Fiat struct { Deposit float64 `json:"deposit"` Withdraw float64 `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 float64 `json:"deposit"` Withdraw float64 `json:"withdraw"` DepositPercentage float64 `json:"deposit_percentage"` WithdrawPercentage float64 `json:"withdraw_percentage"` } `json:"fiat"` } `json:"usage"` Rate float64 `json:"rate"` } `json:"result"` }
type GetWsTokenPayload ¶
type GetWsTokenResponse ¶
type MarketDepthResponse ¶
type OpenBooksResponse ¶
type OpenBooksResponse struct { Error int `json:"error"` Result struct { Asks [][]interface{} `json:"asks"` Bids [][]interface{} `json:"bids"` } `json:"result"` }
type OrderID ¶
type OrderID string // After April 19th, 2023 at 18:00PM(GMT+7) Response Field id, first, parent, last change type from Integer to String.
type PlaceBidAskPayload ¶
type PlaceBidAskResponse ¶
type PlaceBidAskResponse struct { Error int `json:"error"` Result struct { ID int `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"` } `json:"result"` }
type ServerStatus ¶
type ServerStatusArray ¶
type ServerStatusArray []ServerStatus
type SymbolsResponse ¶
type TickerProperty ¶
type TickerProperty 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"` Change float64 `json:"change"` PrevClose float64 `json:"prevClose"` PrevOpen float64 `json:"prevOpen"` }
type TickerResponse ¶
type TickerResponse struct { THB1INCH TickerProperty `json:"THB_1INCH"` THBAAVE TickerProperty `json:"THB_AAVE"` THBABT TickerProperty `json:"THB_ABT"` THBADA TickerProperty `json:"THB_ADA"` THBALGO TickerProperty `json:"THB_ALGO"` THBALPHA TickerProperty `json:"THB_ALPHA"` THBAPE TickerProperty `json:"THB_APE"` THBARB TickerProperty `json:"THB_ARB"` THBATOM TickerProperty `json:"THB_ATOM"` THBAVAX TickerProperty `json:"THB_AVAX"` THBAXL TickerProperty `json:"THB_AXL"` THBAXS TickerProperty `json:"THB_AXS"` THBBAL TickerProperty `json:"THB_BAL"` THBBAND TickerProperty `json:"THB_BAND"` THBBAT TickerProperty `json:"THB_BAT"` THBBCH TickerProperty `json:"THB_BCH"` THBBNB TickerProperty `json:"THB_BNB"` THBBTC TickerProperty `json:"THB_BTC"` THBBUSD TickerProperty `json:"THB_BUSD"` THBCELO TickerProperty `json:"THB_CELO"` THBCHZ TickerProperty `json:"THB_CHZ"` THBCOMP TickerProperty `json:"THB_COMP"` THBCRV TickerProperty `json:"THB_CRV"` THBCTXC TickerProperty `json:"THB_CTXC"` THBCVC TickerProperty `json:"THB_CVC"` THBDAI TickerProperty `json:"THB_DAI"` THBDOGE TickerProperty `json:"THB_DOGE"` THBDOT TickerProperty `json:"THB_DOT"` THBDYDX TickerProperty `json:"THB_DYDX"` THBENJ TickerProperty `json:"THB_ENJ"` THBENS TickerProperty `json:"THB_ENS"` THBETH TickerProperty `json:"THB_ETH"` THBFLOW TickerProperty `json:"THB_FLOW"` THBFTM TickerProperty `json:"THB_FTM"` THBFXS TickerProperty `json:"THB_FXS"` THBGAL TickerProperty `json:"THB_GAL"` THBGALA TickerProperty `json:"THB_GALA"` THBGF TickerProperty `json:"THB_GF"` THBGLM TickerProperty `json:"THB_GLM"` THBGRT TickerProperty `json:"THB_GRT"` THBGT TickerProperty `json:"THB_GT"` THBHBAR TickerProperty `json:"THB_HBAR"` THBHFT TickerProperty `json:"THB_HFT"` THBILV TickerProperty `json:"THB_ILV"` THBIMX TickerProperty `json:"THB_IMX"` THBIOST TickerProperty `json:"THB_IOST"` THBJFIN TickerProperty `json:"THB_JFIN"` THBKNC TickerProperty `json:"THB_KNC"` THBKSM TickerProperty `json:"THB_KSM"` THBKUB TickerProperty `json:"THB_KUB"` THBLDO TickerProperty `json:"THB_LDO"` THBLINK TickerProperty `json:"THB_LINK"` THBLRC TickerProperty `json:"THB_LRC"` THBLUNA TickerProperty `json:"THB_LUNA"` THBLYXE TickerProperty `json:"THB_LYXE"` THBMANA TickerProperty `json:"THB_MANA"` THBMATIC TickerProperty `json:"THB_MATIC"` THBMKR TickerProperty `json:"THB_MKR"` THBNEAR TickerProperty `json:"THB_NEAR"` THBOCEAN TickerProperty `json:"THB_OCEAN"` THBOMG TickerProperty `json:"THB_OMG"` THBOP TickerProperty `json:"THB_OP"` THBPOW TickerProperty `json:"THB_POW"` THBSAND TickerProperty `json:"THB_SAND"` THBSCRT TickerProperty `json:"THB_SCRT"` THBSIX TickerProperty `json:"THB_SIX"` THBSNT TickerProperty `json:"THB_SNT"` THBSNX TickerProperty `json:"THB_SNX"` THBSOL TickerProperty `json:"THB_SOL"` THBSTG TickerProperty `json:"THB_STG"` THBSUSHI TickerProperty `json:"THB_SUSHI"` THBTRX TickerProperty `json:"THB_TRX"` THBUNI TickerProperty `json:"THB_UNI"` THBUSDC TickerProperty `json:"THB_USDC"` THBUSDT TickerProperty `json:"THB_USDT"` THBWAN TickerProperty `json:"THB_WAN"` THBXLM TickerProperty `json:"THB_XLM"` THBXRP TickerProperty `json:"THB_XRP"` THBXTZ TickerProperty `json:"THB_XTZ"` THBYFI TickerProperty `json:"THB_YFI"` THBZIL TickerProperty `json:"THB_ZIL"` THBZRX TickerProperty `json:"THB_ZRX"` }
type TickerResponseAny ¶
type TickerResponseAny map[string]TickerProperty
func (*TickerResponseAny) Compile ¶
func (t *TickerResponseAny) Compile() *TickerResponse
type TimeResolution ¶
type TimeResolution string
const ( Time1m TimeResolution = "1" Time5m TimeResolution = "5" Time15m TimeResolution = "15" Time1h TimeResolution = "60" Time240m TimeResolution = "240" Time1d TimeResolution = "D" )
func (TimeResolution) String ¶
func (t TimeResolution) String() string
type TradesResponse ¶
type TradesResponse struct { Error int `json:"error"` Result [][]interface{} `json:"result"` }
Result[0] -> [timestamp, rate, amount,side]
type WalletResponse ¶
type WalletResponse struct { Error float64 `json:"error"` Result WalletResult `json:"result"` }
type WalletResponseAny ¶
func (*WalletResponseAny) Compile ¶
func (w *WalletResponseAny) Compile() *WalletResponse
type WalletResult ¶
type WalletResult struct { THB float64 `json:"THB"` BTC float64 `json:"BTC"` ETH float64 `json:"ETH"` WAN float64 `json:"WAN"` ADA float64 `json:"ADA"` OMG float64 `json:"OMG"` BCH float64 `json:"BCH"` USDT float64 `json:"USDT"` XRP float64 `json:"XRP"` ZIL float64 `json:"ZIL"` SNT float64 `json:"SNT"` CVC float64 `json:"CVC"` LINK float64 `json:"LINK"` IOST float64 `json:"IOST"` ZRX float64 `json:"ZRX"` KNC float64 `json:"KNC"` ABT float64 `json:"ABT"` MANA float64 `json:"MANA"` CTXC float64 `json:"CTXC"` XLM float64 `json:"XLM"` SIX float64 `json:"SIX"` JFIN float64 `json:"JFIN"` BNB float64 `json:"BNB"` POW float64 `json:"POW"` DOGE float64 `json:"DOGE"` DAI float64 `json:"DAI"` BAND float64 `json:"BAND"` KSM float64 `json:"KSM"` DOT float64 `json:"DOT"` USDC float64 `json:"USDC"` BAT float64 `json:"BAT"` NEAR float64 `json:"NEAR"` SCRT float64 `json:"SCRT"` GLM float64 `json:"GLM"` YFI float64 `json:"YFI"` UNI float64 `json:"UNI"` COMP float64 `json:"COMP"` MKR float64 `json:"MKR"` DON float64 `json:"DON"` AAVE float64 `json:"AAVE"` KUB float64 `json:"KUB"` ENJ float64 `json:"ENJ"` ALPHA float64 `json:"ALPHA"` BAL float64 `json:"BAL"` CRV float64 `json:"CRV"` AXS float64 `json:"AXS"` SAND float64 `json:"SAND"` SUSHI float64 `json:"SUSHI"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.