Skip to content

Instantly share code, notes, and snippets.

@c9s
Created January 2, 2022 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c9s/ef1200616ce9f8d23374bea0810eb3c6 to your computer and use it in GitHub Desktop.
Save c9s/ef1200616ce9f8d23374bea0810eb3c6 to your computer and use it in GitHub Desktop.
package api
import "github.com/c9s/requestgen"
//go:generate requestgen -type PlaceOrderRequest
type PlaceOrderRequest struct {
symbol string `param:"symbol,required"`
// "buy" or "sell"
side SideType `param:"side,required" validValues:"buy,sell"`
orderType OrderType `param:"ordType" validValues:"limit,market"`
size string `param:"size"`
// limit order parameters
price *string `param:"price,omitempty"`
timeInForce *TimeInForceType `param:"timeInForce,omitempty" validValues:"GTC,GTT,FOK"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment