mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-14 11:03:53 +00:00
22 lines
597 B
Go
22 lines
597 B
Go
package okexapi
|
|
|
|
import (
|
|
"github.com/c9s/requestgen"
|
|
)
|
|
|
|
//go:generate -command GetRequest requestgen -method GET -responseType .APIResponse -responseDataField Data
|
|
//go:generate -command PostRequest requestgen -method POST -responseType .APIResponse -responseDataField Data
|
|
|
|
//go:generate GetRequest -url "/api/v5/market/ticker" -type GetTickerRequest -responseDataType []MarketTicker
|
|
type GetTickerRequest struct {
|
|
client requestgen.APIClient
|
|
|
|
instId string `param:"instId,query"`
|
|
}
|
|
|
|
func (c *RestClient) NewGetTickerRequest() *GetTickerRequest {
|
|
return &GetTickerRequest{
|
|
client: c,
|
|
}
|
|
}
|