Documentation ¶
Index ¶
- func SetParam(param interface{}) url.Values
- type ActiveOrdersParams
- type ActiveOrdersResponse
- type ActivePositionsAPIResponse
- type ActivePositionsParams
- type ActivePositionsResponse
- type ApiClient
- func (api *ApiClient) ActiveOrders(param ActiveOrdersParams) (map[string]ActiveOrdersResponse, error)
- func (api *ApiClient) ActivePositions(param ActivePositionsParams) (map[string]ActivePositionsResponse, error)
- func (api *ApiClient) CancelOrder(param CancelOrderParams) (*CancelOrderResponse, error)
- func (api *ApiClient) CancelPosition(param CancelPositionParams) (*CancelPositionResponse, error)
- func (api *ApiClient) ChangePosition(param ChangePositionParams) (*ChangePositionResponse, error)
- func (api *ApiClient) CreatePosition(param CreatePositionParams) (*CreatePositionResponse, error)
- func (api *ApiClient) DepositHistory(param DepositHistoryParams) (map[string]DepositHistoryResponse, error)
- func (api *ApiClient) GetIdInfo() (*GetIdInfoResponse, error)
- func (api *ApiClient) GetInfo() (*GetInfoResponse, error)
- func (api *ApiClient) GetInfo2() (*GetInfo2Response, error)
- func (api *ApiClient) GetPersonalInfo() (*GetPersonalInfoResponse, error)
- func (api *ApiClient) GetPositions(param GetPositionsParams) (map[string]GetPositionsResponse, error)
- func (api *ApiClient) PositionHistory(param PositionHistoryParams) (map[string]PositionHistoryResponse, error)
- func (api *ApiClient) Request(method string, values url.Values, out interface{}) error
- func (api *ApiClient) Trade(param TradeParams) (*TradeResponse, error)
- func (api *ApiClient) TradeHistory(param TradeHistoryParams) (map[string]TradeHistoryResponse, error)
- func (api *ApiClient) Withdraw(param WithdrawParams) (*WithdrawResponse, error)
- func (api *ApiClient) WithdrawHistory(param WithdrawHistoryParams) (map[string]WithdrawHistoryResponse, error)
- type ApiError
- type ApiParams
- type ApiResponse
- type CancelOrderApiResponse
- type CancelOrderParams
- type CancelOrderResponse
- type CancelPositionAPIResponse
- type CancelPositionParams
- type CancelPositionResponse
- type ChangePositionAPIResponse
- type ChangePositionParams
- type ChangePositionResponse
- type CreatePositionAPIResponse
- type CreatePositionParams
- type CreatePositionResponse
- type DepositHistoryParams
- type DepositHistoryResponse
- type GetIdInfoApiResponse
- type GetIdInfoResponse
- type GetInfo2Response
- type GetInfoResponse
- type GetPersonalInfoApiResponse
- type GetPersonalInfoResponse
- type GetPositionsAPIResponse
- type GetPositionsParams
- type GetPositionsResponse
- type PositionHistoryAPIResponse
- type PositionHistoryParams
- type PositionHistoryResponse
- type TradeAPIResponse
- type TradeHistoryAPIResponse
- type TradeHistoryParams
- type TradeHistoryResponse
- type TradeParams
- type TradeResponse
- type WithdrawHistoryParams
- type WithdrawHistoryResponse
- type WithdrawParams
- type WithdrawResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActiveOrdersParams ¶
type ActiveOrdersResponse ¶
type ActivePositionsAPIResponse ¶
type ActivePositionsAPIResponse struct { ApiResponse Response map[string]ActivePositionsResponse `json:"return"` }
type ActivePositionsParams ¶
type ActivePositionsResponse ¶
type ActivePositionsResponse struct { GroupId int `json:"group_id"` CurrencyPair string `json:"currency_pair"` Action string `json:"action"` Amount float64 `json:"amount"` Price float64 `json:"price"` Limit float64 `json:"limit"` Stop float64 `json:"stop"` TermEnd string `json:"term_end"` Leverage float64 `json:"leverage"` FeeSpent float64 `json:"fee_spent"` Timestamp string `json:"timestamp"` PriceAvg float64 `json:"price_avg"` AmountDone float64 `json:"amount_done"` CloseAvg float64 `json:"close_avg"` CloseDone float64 `json:"close_done"` DepositJPY float64 `json:"deposit_jpy"` DepositBTC float64 `json:"deposit_btc"` DepositXEM float64 `json:"deposit_xem"` DepositMONA float64 `json:"deposit_mona"` DepositPriceJPY float64 `json:"deposit_price_jpy"` DepositPriceBTC float64 `json:"deposit_price_btc"` DepositPriceXEM float64 `json:"deposit_price_xem"` DepositPriceMONA float64 `json:"deposit_price_mona"` Swap float64 `json:"swap"` }
type ApiClient ¶
func (*ApiClient) ActiveOrders ¶
func (api *ApiClient) ActiveOrders(param ActiveOrdersParams) (map[string]ActiveOrdersResponse, error)
func (*ApiClient) ActivePositions ¶
func (api *ApiClient) ActivePositions(param ActivePositionsParams) (map[string]ActivePositionsResponse, error)
func (*ApiClient) CancelOrder ¶
func (api *ApiClient) CancelOrder(param CancelOrderParams) (*CancelOrderResponse, error)
func (*ApiClient) CancelPosition ¶
func (api *ApiClient) CancelPosition(param CancelPositionParams) (*CancelPositionResponse, error)
func (*ApiClient) ChangePosition ¶
func (api *ApiClient) ChangePosition(param ChangePositionParams) (*ChangePositionResponse, error)
func (*ApiClient) CreatePosition ¶
func (api *ApiClient) CreatePosition(param CreatePositionParams) (*CreatePositionResponse, error)
func (*ApiClient) DepositHistory ¶
func (api *ApiClient) DepositHistory(param DepositHistoryParams) (map[string]DepositHistoryResponse, error)
func (*ApiClient) GetIdInfo ¶
func (api *ApiClient) GetIdInfo() (*GetIdInfoResponse, error)
func (*ApiClient) GetInfo ¶
func (api *ApiClient) GetInfo() (*GetInfoResponse, error)
func (*ApiClient) GetInfo2 ¶
func (api *ApiClient) GetInfo2() (*GetInfo2Response, error)
func (*ApiClient) GetPersonalInfo ¶
func (api *ApiClient) GetPersonalInfo() (*GetPersonalInfoResponse, error)
func (*ApiClient) GetPositions ¶
func (api *ApiClient) GetPositions(param GetPositionsParams) (map[string]GetPositionsResponse, error)
func (*ApiClient) PositionHistory ¶
func (api *ApiClient) PositionHistory(param PositionHistoryParams) (map[string]PositionHistoryResponse, error)
func (*ApiClient) Trade ¶
func (api *ApiClient) Trade(param TradeParams) (*TradeResponse, error)
func (*ApiClient) TradeHistory ¶
func (api *ApiClient) TradeHistory(param TradeHistoryParams) (map[string]TradeHistoryResponse, error)
func (*ApiClient) Withdraw ¶
func (api *ApiClient) Withdraw(param WithdrawParams) (*WithdrawResponse, error)
func (*ApiClient) WithdrawHistory ¶
func (api *ApiClient) WithdrawHistory(param WithdrawHistoryParams) (map[string]WithdrawHistoryResponse, error)
type ApiResponse ¶
type CancelOrderApiResponse ¶
type CancelOrderApiResponse struct { ApiResponse Response *CancelOrderResponse `json:"return"` }
type CancelOrderParams ¶
type CancelOrderResponse ¶
type CancelOrderResponse struct { OrderID int `json:"order_id"` Funds struct { BTC float64 `json:"btc"` JPY float64 `json:"jpy"` MONA float64 `json:"mona"` XEM float64 `json:"xem"` ZAIF float64 `json:"ZAIF"` XCP float64 `json:"XCP"` SJCX float64 `json:"SJCX"` BITCR float64 `json:"BITCRISTALS"` PEPE float64 `json:"PEPECASH"` FSCC float64 `json:"FSCC"` CICC float64 `json:"CICC"` NCXC float64 `json:"NCXC"` JPYZ float64 `json:"JPYZ"` ETH float64 `json:"ETH"` BCH float64 `json:"BCH"` ERC20 float64 `json:"ERC20.CMS"` MOSAIC float64 `json:"MOSAIC.CMS"` } `json:"funds"` }
type CancelPositionAPIResponse ¶
type CancelPositionAPIResponse struct { ApiResponse Response *CancelPositionResponse `json:"return"` }
type CancelPositionParams ¶
type CancelPositionResponse ¶
type CancelPositionResponse struct { LeverageId int `json:"leverage_id"` FeeSpent float64 `json:"fee_spent"` TimestampClosed string `json:"timestamp_closed"` PriceAvg float64 `json:"price_avg"` AmountDone float64 `json:"amount_done"` CloseAvg float64 `json:"close_avg"` CloseDone float64 `json:"close_done"` RefundedBtc float64 `json:"refunded_btc"` RefundedPriceBtc float64 `json:"refunded_price_btc"` Swap float64 `json:"swap"` GuardFee float64 `json:"guard_fee"` Funds struct { BTC float64 `json:"btc"` JPY float64 `json:"jpy"` MONA float64 `json:"mona"` XEM float64 `json:"xem"` ZAIF float64 `json:"ZAIF"` XCP float64 `json:"XCP"` SJCX float64 `json:"SJCX"` BCY float64 `json:"BITCRISTALS"` PEPE float64 `json:"PEPECASH"` FSCC float64 `json:"FSCC"` CICC float64 `json:"CICC"` NCXC float64 `json:"NCXC"` JPYZ float64 `json:"JPYZ"` ETH float64 `json:"ETH"` BCH float64 `json:"BCH"` ERC20 float64 `json:"ERC20.CMS"` MOSAIC float64 `json:"MOSAIC.CMS"` } `json:"funds"` }
type ChangePositionAPIResponse ¶
type ChangePositionAPIResponse struct { ApiResponse Response *ChangePositionResponse `json:"return"` }
type ChangePositionParams ¶
type ChangePositionResponse ¶
type ChangePositionResponse struct { LeverageId int `json:"leverage_id"` TimestampClosed int `json:"timestamp_closed"` PriceAvg float64 `json:"price_avg"` AmountDone float64 `json:"amount_done"` CloseAvg float64 `json:"close_avg"` CloseDone float64 `json:"close_done"` RefundedBtc float64 `json:"refunded_btc"` RefundedPriceBtc float64 `json:"refunded_price_btc"` Swap float64 `json:"swap"` GuardFee float64 `json:"guard_fee"` }
type CreatePositionAPIResponse ¶
type CreatePositionAPIResponse struct { ApiResponse Response *CreatePositionResponse `json:"return"` }
type CreatePositionParams ¶
type CreatePositionParams struct { Type string `url:"type"` // margin or futures GroupID int `url:"group_id"` // type = futuresの場合必須 CurrencyPair string `url:"currency_pair"` Action string `url:"action"` Price float64 `url:"price"` Amount float64 `url:"amount"` Leverage float64 `url:"leverage"` Limit float64 `url:"limit"` Stop float64 `url:"stop"` }
type CreatePositionResponse ¶
type CreatePositionResponse struct { LeverageId int `json:"leverage_id"` Timestamp string `json:"timestamp"` TermEnd string `json:"term_end"` PriceAvg float64 `json:"price_avg"` AmountDone float64 `json:"amount_done"` DepositJPY float64 `json:"deposit_jpy"` DepositBTC float64 `json:"deposit_btc"` DepositXEM float64 `json:"deposit_xem"` DepositMONA float64 `json:"deposit_mona"` DepositPriceJPY float64 `json:"deposit_price_jpy"` DepositPriceBTC float64 `json:"deposit_price_btc"` DepositPriceXEM float64 `json:"deposit_price_xem"` DepositPriceMONA float64 `json:"deposit_price_mona"` Funds struct { BTC float64 `json:"btc"` JPY float64 `json:"jpy"` MONA float64 `json:"mona"` XEM float64 `json:"xem"` ZAIF float64 `json:"ZAIF"` XCP float64 `json:"XCP"` SJCX float64 `json:"SJCX"` BCY float64 `json:"BITCRISTALS"` PEPE float64 `json:"PEPECASH"` FSCC float64 `json:"FSCC"` CICC float64 `json:"CICC"` NCXC float64 `json:"NCXC"` JPYZ float64 `json:"JPYZ"` ETH float64 `json:"ETH"` BCH float64 `json:"BCH"` ERC20 float64 `json:"ERC20.CMS"` MOSAIC float64 `json:"MOSAIC.CMS"` } `json:"funds"` }
type DepositHistoryParams ¶
type DepositHistoryResponse ¶
type GetIdInfoApiResponse ¶
type GetIdInfoApiResponse struct { ApiResponse Response *GetIdInfoResponse `json:"return"` }
type GetIdInfoResponse ¶
type GetInfo2Response ¶
type GetInfo2Response struct { Funds struct { BTC float64 `json:"btc"` JPY float64 `json:"jpy"` MONA float64 `json:"mona"` XEM float64 `json:"xem"` ZAIF float64 `json:"ZAIF"` XCP float64 `json:"XCP"` SJCX float64 `json:"SJCX"` BCY float64 `json:"BITCRISTALS"` PEPE float64 `json:"PEPECASH"` FSCC float64 `json:"FSCC"` CICC float64 `json:"CICC"` NCXC float64 `json:"NCXC"` JPYZ float64 `json:"JPYZ"` ETH float64 `json:"ETH"` BCH float64 `json:"BCH"` ERC20 float64 `json:"ERC20.CMS"` MOSAIC float64 `json:"MOSAIC.CMS"` } `json:"funds"` Deposit struct { BTC float64 `json:"btc"` JPY float64 `json:"jpy"` MONA float64 `json:"mona"` XEM float64 `json:"xem"` ZAIF float64 `json:"ZAIF"` XCP float64 `json:"XCP"` SJCX float64 `json:"SJCX"` BCY float64 `json:"BITCRISTALS"` PEPE float64 `json:"PEPECASH"` FSCC float64 `json:"FSCC"` CICC float64 `json:"CICC"` NCXC float64 `json:"NCXC"` JPYZ float64 `json:"JPYZ"` ETH float64 `json:"ETH"` BCH float64 `json:"BCH"` ERC20 float64 `json:"ERC20.CMS"` MOSAIC float64 `json:"MOSAIC.CMS"` } `json:"deposit"` Rights struct { IdInfo int `json:"id_info"` Info int `json:"info"` PersonalInfo int `json:"personal_info"` Trade int `json:"private"` Withdraw int `json:"withdraw"` } `json:"rights"` OpenOrders int `json:"open_orders"` ServerTime int `json:"server_time"` TradeCount int `json:"trade_count"` }
type GetInfoResponse ¶
type GetInfoResponse struct { Funds struct { BTC float64 `json:"btc"` JPY float64 `json:"jpy"` MONA float64 `json:"mona"` XEM float64 `json:"xem"` ZAIF float64 `json:"ZAIF"` XCP float64 `json:"XCP"` SJCX float64 `json:"SJCX"` BCY float64 `json:"BITCRISTALS"` PEPE float64 `json:"PEPECASH"` FSCC float64 `json:"FSCC"` CICC float64 `json:"CICC"` NCXC float64 `json:"NCXC"` JPYZ float64 `json:"JPYZ"` ETH float64 `json:"ETH"` BCH float64 `json:"BCH"` ERC20 float64 `json:"ERC20.CMS"` MOSAIC float64 `json:"MOSAIC.CMS"` } `json:"funds"` Deposit struct { BTC float64 `json:"btc"` JPY float64 `json:"jpy"` MONA float64 `json:"mona"` XEM float64 `json:"xem"` ZAIF float64 `json:"ZAIF"` XCP float64 `json:"XCP"` SJCX float64 `json:"SJCX"` BCY float64 `json:"BITCRISTALS"` PEPE float64 `json:"PEPECASH"` FSCC float64 `json:"FSCC"` CICC float64 `json:"CICC"` NCXC float64 `json:"NCXC"` JPYZ float64 `json:"JPYZ"` ETH float64 `json:"ETH"` BCH float64 `json:"BCH"` ERC20 float64 `json:"ERC20.CMS"` MOSAIC float64 `json:"MOSAIC.CMS"` } `json:"deposit"` Rights struct { IdInfo int `json:"id_info"` Info int `json:"info"` PersonalInfo int `json:"personal_info"` Trade int `json:"private"` Withdraw int `json:"withdraw"` } `json:"rights"` OpenOrders int `json:"open_orders"` ServerTime int `json:"server_time"` TradeCount int `json:"trade_count"` }
type GetPersonalInfoApiResponse ¶
type GetPersonalInfoApiResponse struct { ApiResponse Response *GetPersonalInfoResponse `json:"return"` }
type GetPersonalInfoResponse ¶
type GetPositionsAPIResponse ¶
type GetPositionsAPIResponse struct { ApiResponse Response map[string]GetPositionsResponse `json:"return"` }
type GetPositionsParams ¶
type GetPositionsParams struct { Type string `url:"type"` // margin or futures GroupID int `url:"group_id"` From int `url:"from"` Count int `url:"count"` FromID int `url:"from_id"` EndID int `url:"end_id"` Order string `url:"order"` // ASC or DESC Since int `url:"since"` End int `url:"end"` CurrencyPair string `url:"currency_pair"` }
type GetPositionsResponse ¶
type GetPositionsResponse struct { GroupId int `json:"group_id"` CurrencyPair string `json:"currency_pair"` Action string `json:"action"` Amount float64 `json:"amount"` Price float64 `json:"price"` Limit float64 `json:"limit"` Stop float64 `json:"stop"` TermEnd string `json:"term_end"` Leverage float64 `json:"leverage"` FeeSpent float64 `json:"fee_spent"` Timestamp string `json:"timestamp"` TimestampClosed string `json:"timestamp_closed"` PriceAvg float64 `json:"price_avg"` AmountDone float64 `json:"amount_done"` CloseAvg float64 `json:"close_avg"` CloseDone float64 `json:"close_done"` RefundedJPY float64 `json:"refunded_jpy"` RefundedBTC float64 `json:"refunded_btc"` RefundedXEM float64 `json:"refunded_xem"` RefundedMONA float64 `json:"refunded_mona"` RefundedPriceJPY float64 `json:"refunded_price_jpy"` RefundedPriceBTC float64 `json:"refunded_price_btc"` RefundedPriceXEM float64 `json:"refunded_price_xem"` RefundedPriceMONA float64 `json:"refunded_price_mona"` Swap float64 `json:"swap"` GuardFee float64 `json:"guard_fee"` }
type PositionHistoryAPIResponse ¶
type PositionHistoryAPIResponse struct { ApiResponse Response map[string]PositionHistoryResponse `json:"return"` }
type PositionHistoryParams ¶
type PositionHistoryResponse ¶
type PositionHistoryResponse struct { GroupId int `json:"group_id"` CurrencyPair string `json:"currency_pair"` Action string `json:"action"` Amount float64 `json:"amount"` Price float64 `json:"price"` Timestamp string `json:"timestamp"` Stop float64 `json:"stop"` YourAction string `json:"your_action"` BidLeverageId string `json:"bid_leverage_id"` AskLeverageId string `json:"ask_leverage_id"` }
type TradeAPIResponse ¶
type TradeAPIResponse struct { ApiResponse Response *TradeResponse `json:"return"` }
type TradeHistoryAPIResponse ¶
type TradeHistoryAPIResponse struct { ApiResponse Response map[string]TradeHistoryResponse `json:"return"` }
type TradeHistoryParams ¶
type TradeHistoryResponse ¶
type TradeHistoryResponse struct { CurrencyPair string `json:"currency_pair"` Action string `json:"action"` Amount float64 `json:"amount"` Price float64 `json:"price"` YourAction string `json:"your_action"` Bonus float64 `json:"bonus"` Timestamp string `json:"timestamp"` Comment string `json:"comment"` }
type TradeParams ¶
type TradeResponse ¶
type TradeResponse struct { Received float64 `json:"received"` Remains float64 `json:"remains"` OrderId int `json:"order_id"` Funds struct { BTC float64 `json:"btc"` JPY float64 `json:"jpy"` MONA float64 `json:"mona"` XEM float64 `json:"xem"` ZAIF float64 `json:"ZAIF"` XCP float64 `json:"XCP"` SJCX float64 `json:"SJCX"` BCY float64 `json:"BITCRISTALS"` PEPE float64 `json:"PEPECASH"` FSCC float64 `json:"FSCC"` CICC float64 `json:"CICC"` NCXC float64 `json:"NCXC"` JPYZ float64 `json:"JPYZ"` ETH float64 `json:"ETH"` BCH float64 `json:"BCH"` ERC20 float64 `json:"ERC20.CMS"` MOSAIC float64 `json:"MOSAIC.CMS"` } `json:"funds"` }
type WithdrawHistoryParams ¶
type WithdrawHistoryResponse ¶
type WithdrawParams ¶
type WithdrawResponse ¶
type WithdrawResponse struct { Id int `json:"id"` Txid string `json:"txid"` Fee float64 `json:"fee"` Funds struct { BTC float64 `json:"btc"` JPY float64 `json:"jpy"` MONA float64 `json:"mona"` XEM float64 `json:"xem"` ZAIF float64 `json:"ZAIF"` XCP float64 `json:"XCP"` SJCX float64 `json:"SJCX"` BCY float64 `json:"BITCRISTALS"` PEPE float64 `json:"PEPECASH"` FSCC float64 `json:"FSCC"` CICC float64 `json:"CICC"` NCXC float64 `json:"NCXC"` JPYZ float64 `json:"JPYZ"` ETH float64 `json:"ETH"` BCH float64 `json:"BCH"` ERC20 float64 `json:"ERC20.CMS"` MOSAIC float64 `json:"MOSAIC.CMS"` } `json:"funds"` }
Click to show internal directories.
Click to hide internal directories.