account

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountTransferResponse

type AccountTransferResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data struct {
		OrderId string `json:"order_id"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type CrossGetSettlementRecordsResponse

type CrossGetSettlementRecordsResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data struct {
		SettlementRecords []struct {
			MarginMode string `json:"margin_mode"`

			MarginAccount string `json:"margin_account"`

			MarginBalanceInit float32 `json:"margin_balance_init"`

			MarginBalance float32 `json:"margin_balance"`

			SettlementProfitReal float32 `json:"settlement_profit_real"`

			SettlementTime int64 `json:"settlement_time"`

			Clawback float32 `json:"clawback"`

			FundingFee float32 `json:"funding_fee"`

			OffsetProfitloss float32 `json:"offset_profitloss"`

			Fee float32 `json:"fee"`

			FeeAsset string `json:"fee_asset"`

			ContractDetail []struct {
				Symbol string `json:"symbol"`

				ContractCode string `json:"contract_code"`

				OffsetProfitloss float32 `json:"offset_profitloss"`

				Fee float32 `json:"fee"`

				FeeAsset string `json:"fee_asset"`

				Positions []struct {
					Symbol string `json:"symbol"`

					ContractCode string `json:"contract_code"`

					Direction string `json:"direction"`

					Volume float32 `json:"volume"`

					CostOpen float32 `json:"cost_open"`

					CostHoldPre float32 `json:"cost_hold_pre"`

					CostHold float32 `json:"cost_hold"`

					SettlementProfitUnreal float32 `json:"settlement_profit_unreal"`

					SettlementPrice float32 `json:"settlement_price"`

					SettlementType string `json:"settlement_type"`
				} `json:"positions"`
			} `json:"contract_detail"`
		} `json:"settlement_records"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetAccountInfoResponse

type GetAccountInfoResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data []struct {
		Symbol string `json:"symbol"`

		ContractCode string `json:"contract_code"`

		MarginAsset string `json:"margin_asset"`

		MarginBalance float32 `json:"margin_balance"`

		MarginStatic float32 `json:"margin_static"`

		MarginPosition float32 `json:"margin_position"`

		MarginFrozen float32 `json:"margin_frozen"`

		MarginAvailable float32 `json:"margin_available"`

		ProfitReal float32 `json:"profit_real"`

		ProfitUnreal float32 `json:"profit_unreal"`

		WithdrawAvailable float32 `json:"withdraw_available,omitempty"`

		RiskRate float32 `json:"risk_rate,omitempty"`

		LiquidationPrice float32 `json:"liquidation_price,omitempty"`

		LeverRate float32 `json:"lever_rate"`

		AdjustFactor float32 `json:"adjust_factor"`

		MarginMode string `json:"margin_mode"`

		MarginAccount string `json:"margin_account"`

		ContractDetail []struct {
			Symbol string `json:"symbol"`

			ContractCode string `json:"contract_code"`

			MarginPosition float32 `json:"margin_position"`

			MarginFrozen float32 `json:"margin_frozen"`

			MarginAvailable float32 `json:"margin_available"`

			ProfitUnreal float32 `json:"profit_unreal"`

			LiquidationPrice float32 `json:"liquidation_price"`

			LeverRate float32 `json:"lever_rate"`

			AdjustFactor float32 `json:"adjust_factor"`
		} `json:"contract_detail,omitempty"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetAccountPositionResponse

type GetAccountPositionResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data []struct {
		Symbol string `json:"symbol"`

		ContractCode string `json:"contract_code"`

		Volume float32 `json:"volume"`

		Available float32 `json:"available"`

		Frozen float32 `json:"frozen"`

		CostOpen float32 `json:"cost_open"`

		CostHold float32 `json:"cost_hold"`

		ProfitUnreal float32 `json:"profit_unreal"`

		ProfitRate float32 `json:"profit_rate"`

		Profit float32 `json:"profit"`

		MarginAsset string `json:"margin_asset"`

		PositionMargin float32 `json:"position_margin"`

		LeverRate int `json:"lever_rate"`

		Direction string `json:"direction"`

		LastPrice float32 `json:"last_price"`

		MarginMode string `json:"margin_mode"`

		MarginAccount string `json:"margin_account"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetAccountTransHisResponse

type GetAccountTransHisResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data struct {
		FinancialRecord []struct {
			Id int64 `json:"id"`

			Ts int64 `json:"ts"`

			Asset string `json:"asset"`

			ContractCode string `json:"contract_code"`

			MarginAccount string `json:"margin_account"`

			Amount float32 `json:"amount"`

			// region only for account
			FaceMarginAccount string `json:"face_margin_account,omitempty"`

			FcType int `json:"type,omitempty"`

			// region only for sub account
			FromMarginAccount string `json:"from_margin_account,omitempty"`

			ToMarginAccount string `json:"to_margin_account,omitempty"`

			SubUid string `json:"sub_uid,omitempty"`

			SubAccountName string `json:"sub_account_name,omitempty"`

			TransferType int `json:"transfer_type,omitempty"`
		} `json:"financial_record"`

		TotalPage int `json:"total_page"`

		CurrentPage int `json:"current_page"`

		TotalSize int `json:"total_size"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetApiTradingStatusResponse

type GetApiTradingStatusResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Ts int64 `json:"ts"`

	Data struct {
		IsDisable int `json:"is_disable"`

		OrderPriceTypes string `json:"order_price_types"`

		DisableReason string `json:"disable_reason"`

		DisableInterval int64 `json:"disable_interval"`

		RecoveryTime int64 `json:"recovery_time"`

		COR struct {
			OrdersThreshold int64 `json:"orders_threshold"`

			Orders int64 `json:"orders"`

			InvalidCancelOrders int64 `json:"invalid_cancel_orders"`

			CancelRatioThreshold float32 `json:"cancel_ratio_threshold"`

			CancelRatio float32 `json:"cancel_ratio"`

			IsTrigger int `json:"is_trigger"`

			IsActive int `json:"is_active"`
		}

		TDN struct {
			DisablesThreshold int64 `json:"disables_threshold"`

			Disables int64 `json:"disables"`

			IsTrigger int `json:"is_trigger"`

			IsActive int `json:"is_active"`
		}
	} `json:"data,omitempty"`
}

type GetAssetsPositionResponse

type GetAssetsPositionResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data []struct {
		Symbol string `json:"symbol,omitempty"`

		ContractCode string `json:"contract_code,omitempty"`

		MarginAsset string `json:"margin_asset"`

		MarginBalance float32 `json:"margin_balance"`

		MarginStatic float32 `json:"margin_static"`

		MarginPosition float32 `json:"margin_position"`

		MarginFrozen float32 `json:"margin_frozen"`

		MarginAvailable float32 `json:"margin_available,omitempty"`

		ProfitReal float32 `json:"profit_real"`

		ProfitUnreal float32 `json:"profit_unreal"`

		WithdrawAvailable float32 `json:"withdraw_available,omitempty"`

		RiskRate float32 `json:"risk_rate,omitempty"`

		LiquidationPrice float32 `json:"liquidation_price,omitempty"`

		LeverRate float32 `json:"lever_rate,omitempty"`

		AdjustFactor float32 `json:"adjust_factor,omitempty"`

		MarginMode string `json:"margin_mode"`

		MarginAccount string `json:"margin_account"`

		ContractDetail []struct {
			Symbol string `json:"symbol"`

			ContractCode string `json:"contract_code"`

			MarginPosition float32 `json:"margin_position"`

			MarginFrozen float32 `json:"margin_frozen"`

			MarginAvailable float32 `json:"margin_available"`

			ProfitUnreal float32 `json:"profit_unreal"`

			LiquidationPrice float32 `json:"liquidation_price"`

			LeverRate float32 `json:"lever_rate"`

			AdjustFactor float32 `json:"adjust_factor"`
		} `json:"contract_detail,omitempty"`

		Positions []struct {
			Symbol string `json:"symbol"`

			ContractCode string `json:"contract_code"`

			Volume float32 `json:"volume"`

			Available float32 `json:"available"`

			Frozen float32 `json:"frozen"`

			CostOpen float32 `json:"cost_open"`

			CostHold float32 `json:"cost_hold"`

			ProfitUnreal float32 `json:"profit_unreal"`

			ProfitRate float32 `json:"profit_rate"`

			Profit float32 `json:"profit"`

			MarginAsset string `json:"margin_asset"`

			PositionMargin float32 `json:"position_margin"`

			LeverRate int `json:"lever_rate"`

			Direction string `json:"direction"`

			LastPrice float32 `json:"last_price"`

			MarginMode string `json:"margin_mode"`

			MarginAccount string `json:"margin_account"`
		} `json:"positions,omitempty"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetAssetsPositionResponseSingle

type GetAssetsPositionResponseSingle struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data struct {
		Symbol string `json:"symbol,omitempty"`

		ContractCode string `json:"contract_code,omitempty"`

		MarginAsset string `json:"margin_asset"`

		MarginBalance float32 `json:"margin_balance"`

		MarginStatic float32 `json:"margin_static"`

		MarginPosition float32 `json:"margin_position"`

		MarginFrozen float32 `json:"margin_frozen"`

		MarginAvailable float32 `json:"margin_available,omitempty"`

		ProfitReal float32 `json:"profit_real"`

		ProfitUnreal float32 `json:"profit_unreal"`

		WithdrawAvailable float32 `json:"withdraw_available,omitempty"`

		RiskRate float32 `json:"risk_rate,omitempty"`

		LiquidationPrice float32 `json:"liquidation_price,omitempty"`

		LeverRate float32 `json:"lever_rate,omitempty"`

		AdjustFactor float32 `json:"adjust_factor,omitempty"`

		MarginMode string `json:"margin_mode"`

		MarginAccount string `json:"margin_account"`

		ContractDetail []struct {
			Symbol string `json:"symbol"`

			ContractCode string `json:"contract_code"`

			MarginPosition float32 `json:"margin_position"`

			MarginFrozen float32 `json:"margin_frozen"`

			MarginAvailable float32 `json:"margin_available"`

			ProfitUnreal float32 `json:"profit_unreal"`

			LiquidationPrice float32 `json:"liquidation_price"`

			LeverRate float32 `json:"lever_rate"`

			AdjustFactor float32 `json:"adjust_factor"`
		} `json:"contract_detail,omitempty"`

		Positions []struct {
			Symbol string `json:"symbol"`

			ContractCode string `json:"contract_code"`

			Volume float32 `json:"volume"`

			Available float32 `json:"available"`

			Frozen float32 `json:"frozen"`

			CostOpen float32 `json:"cost_open"`

			CostHold float32 `json:"cost_hold"`

			ProfitUnreal float32 `json:"profit_unreal"`

			ProfitRate float32 `json:"profit_rate"`

			Profit float32 `json:"profit"`

			MarginAsset string `json:"margin_asset"`

			PositionMargin float32 `json:"position_margin"`

			LeverRate int `json:"lever_rate"`

			Direction string `json:"direction"`

			LastPrice float32 `json:"last_price"`

			MarginMode string `json:"margin_mode"`

			MarginAccount string `json:"margin_account"`
		} `json:"positions,omitempty"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetBalanceValuationResponse

type GetBalanceValuationResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data []struct {
		ValuationAsset string `json:"valuation_asset"`

		Balance string `json:"balance"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetFeeResponse

type GetFeeResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data []struct {
		Symbol string `json:"symbol"`

		ContractCode string `json:"contract_code"`

		OpenMakerFee string `json:"open_maker_fee"`

		OpenTakerFee string `json:"open_taker_fee"`

		CloseMakerFee string `json:"close_maker_fee"`

		CloseTakerFee string `json:"close_taker_fee"`

		FeeAsset string `json:"fee_asset"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetFinancialRecordExactResponse

type GetFinancialRecordExactResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data struct {
		FinancialRecord []struct {
			Id int64 `json:"id"`

			Ts int64 `json:"ts"`

			Asset string `json:"asset"`

			ContractCode string `json:"contract_code"`

			MarginAccount string `json:"margin_account"`

			FaceMarginAccount string `json:"face_margin_account"`

			FcType int `json:"type,omitempty"`

			Amount float32 `json:"amount"`
		} `json:"financial_record"`

		RemainSize int `json:"remain_size"`

		NextId int64 `json:"next_id,omitempty"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetOrderLimitResponse

type GetOrderLimitResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data struct {
		OrderPriceType string `json:"order_price_type"`

		List []struct {
			Symbol string `json:"symbol"`

			ContractCode string `json:"contract_code"`

			OpenLimit float32 `json:"open_limit"`

			CloseLimit float32 `json:"close_limit"`
		} `json:"list"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetPositionLimitResponse

type GetPositionLimitResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data []struct {
		Symbol string `json:"symbol"`

		ContractCode string `json:"contract_code"`

		BuyLimit float32 `json:"buy_limit"`

		SellLimit float32 `json:"sell_limit"`

		MarginMode string `json:"margin_mode"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetSubAccountInfoListResponse

type GetSubAccountInfoListResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data struct {
		SubList []struct {
			SubUid int64 `json:"sub_uid"`

			AccountInfoList []struct {
				Symbol string `json:"symbol"`

				ContractCode string `json:"contract_code"`

				MarginMode string `json:"margin_mode"`

				MarginAccount string `json:"margin_account"`

				MarginAsset string `json:"margin_asset"`

				MarginBalance float32 `json:"margin_balance"`

				LiquidationPrice float32 `json:"liquidation_price,omitempty"`

				RiskRate float32 `json:"risk_rate,omitempty"`
			} `json:"account_info_list"`
		} `json:"sub_list"`

		TotalPage int `json:"total_page"`

		CurrentPage int `json:"current_page"`

		TotalSize int `json:"total_size"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetSubAccountListResponse

type GetSubAccountListResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data []struct {
		SubUid int64 `json:"sub_uid"`
		// contains filtered or unexported fields
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetTransferLimitResponse

type GetTransferLimitResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data []struct {
		Symbol string `json:"symbol"`

		ContractCode string `json:"contract_code"`

		OpenLimit string `json:"open_limit"`

		TransferInMaxEach float32 `json:"transfer_in_max_each"`

		TransferInMinEach float32 `json:"transfer_in_min_each"`

		TransferOutMaxEach float32 `json:"transfer_out_max_each"`

		TransferOutMinEach float32 `json:"transfer_out_min_each"`

		TransferInMaxDaily float32 `json:"transfer_in_max_daily"`

		TransferOutMaxDaily float32 `json:"transfer_out_max_daily"`

		NetTransferInMaxDaily float32 `json:"net_transfer_in_max_daily"`

		NetTransferOutMaxDaily float32 `json:"net_transfer_out_max_daily"`

		MarginMode string `json:"margin_mode"`

		MarginAccount string `json:"margin_account"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type GetValidLeverRateResponse

type GetValidLeverRateResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data []struct {
		ContractCode string `json:"contract_code"`

		MarginMode string `json:"margin_mode"`

		AvailableLeverRate string `json:"available_level_rate"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type IsolatedGetSettlementRecordsResponse

type IsolatedGetSettlementRecordsResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data struct {
		SettlementRecords []struct {
			Symbol string `json:"symbol"`

			ContractCode string `json:"contract_code"`

			MarginMode string `json:"margin_mode"`

			MarginAccount string `json:"margin_account"`

			MarginBalanceInit float32 `json:"margin_balance_init"`

			MarginBalance float32 `json:"margin_balance"`

			SettlementProfitReal float32 `json:"settlement_profit_real"`

			SettlementTime int64 `json:"settlement_time"`

			Clawback float32 `json:"clawback"`

			FundingFee float32 `json:"funding_fee"`

			OffsetProfitloss float32 `json:"offset_profitloss"`

			Fee float32 `json:"fee"`

			FeeAsset string `json:"fee_asset"`

			Positions []struct {
				Symbol string `json:"symbol"`

				ContractCode string `json:"contract_code"`

				Direction string `json:"direction"`

				Volume float32 `json:"volume"`

				CostOpen float32 `json:"cost_open"`

				CostHoldPre float32 `json:"cost_hold_pre"`

				CostHold float32 `json:"cost_hold"`

				SettlementProfitUnreal float32 `json:"settlement_profit_unreal"`

				SettlementPrice float32 `json:"settlement_price"`

				SettlementType string `json:"settlement_type"`
			} `json:"positions"`
		} `json:"settlement_records"`
	} `json:"data,omitempty"`

	Ts int64 `json:"ts"`
}

type SetSubAuthResponse

type SetSubAuthResponse struct {
	Status string `json:"status"`

	ErrorCode int `json:"err_code,omitempty"`

	ErrorMessage string `json:"err_msg,omitempty"`

	Data struct {
		Errors []struct {
			SubUid string `json:"sub_uid,omitempty"`

			ErrorCode int `json:"err_code,omitempty"`

			ErrorMessage string `json:"err_msg,omitempty"`
		} `json:"errors"`
		Successes string `json:"successes"`
	} `json:"data,omitempty"`
	Ts int64 `json:"ts"`
}

Jump to

Keyboard shortcuts

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