rest

package
Version: v0.0.0-...-55a620b Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Level1 = "1"
	Level2 = "2"
	Level3 = "3"
)

Variables

This section is empty.

Functions

func CancelOrder

func CancelOrder(ctx *gin.Context)

撤销指定id的订单 DELETE /orders/1 DELETE /orders/client:1

func CancelOrders

func CancelOrders(ctx *gin.Context)

批量撤单 DELETE /orders/?productId=BTC-USDT&side=[buy,sell]

func ChangePassword

func ChangePassword(ctx *gin.Context)

ChangePassword export - POST /users/password

func GetAccounts

func GetAccounts(ctx *gin.Context)

获取用户余额 GET /accounts?currency=BTC&currency=USDT

func GetConfigs

func GetConfigs(ctx *gin.Context)

GET /configs

func GetCurrentUser

func GetCurrentUser(ctx *gin.Context) *models.User

func GetOrders

func GetOrders(ctx *gin.Context)

GET /orders

func GetProductCandles

func GetProductCandles(ctx *gin.Context)

GET /products/<product-id>/candles

func GetProductOrderBook

func GetProductOrderBook(ctx *gin.Context)

GET /products/<product-id>/book?level=[1,2,3]

func GetProductTicker

func GetProductTicker()

GET /products/<product-id>/ticker

func GetProductTrades

func GetProductTrades(ctx *gin.Context)

GET /products/<product-id>/trades

func GetProducts

func GetProducts(ctx *gin.Context)

GET /products

func GetToken

func GetToken(ctx *gin.Context)

GetToken export - POST /users/token

func GetUsersSelf

func GetUsersSelf(ctx *gin.Context)

GetUsersSelf export - GET /users/self

func GetWalletAddress

func GetWalletAddress(ctx *gin.Context)

GET /wallets/{currency}/address

func GetWalletTransactions

func GetWalletTransactions(ctx *gin.Context)

GET /wallets/{currency}/transactions

func PlaceOrder

func PlaceOrder(ctx *gin.Context)

POST /orders

func SignIn

func SignIn(ctx *gin.Context)

SignIn export - POST /users/accessToken

func SignOut

func SignOut(ctx *gin.Context)

SignOut export - DELETE /users/accessToken

func SignUp

func SignUp(ctx *gin.Context)

SignUp export - POST /users

func StartServer

func StartServer()

func Withdrawal

func Withdrawal(ctx *gin.Context)

POST /wallets/{currency}/withdrawal

Types

type AccountVo

type AccountVo struct {
	Id           string `json:"id"`
	Currency     string `json:"currency"`
	CurrencyIcon string `json:"currencyIcon"`
	Available    string `json:"available"`
	Hold         string `json:"hold"`
}

type HttpServer

type HttpServer struct {
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(addr string) *HttpServer

func (*HttpServer) Start

func (server *HttpServer) Start()

type ProductVo

type ProductVo struct {
	Id             string `json:"id"`
	BaseCurrency   string `json:"baseCurrency"`
	QuoteCurrency  string `json:"quoteCurrency"`
	BaseMinSize    string `json:"baseMinSize"`
	BaseMaxSize    string `json:"baseMaxSize"`
	QuoteIncrement string `json:"quoteIncrement"`
	BaseScale      int32  `json:"baseScale"`
	QuoteScale     int32  `json:"quoteScale"`
}

type SignUpRequest

type SignUpRequest struct {
	Email    string
	Password string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL