// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.

package alpaca

import (
	civil "cloud.google.com/go/civil"
	json "encoding/json"
	easyjson "github.com/mailru/easyjson"
	jlexer "github.com/mailru/easyjson/jlexer"
	jwriter "github.com/mailru/easyjson/jwriter"
	decimal "github.com/shopspring/decimal"
	time "time"
)

// suppress unused package warning
var (
	_ *json.RawMessage
	_ *jlexer.Lexer
	_ *jwriter.Writer
	_ easyjson.Marshaler
)

func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca(in *jlexer.Lexer, out *watchlistSlice) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		in.Skip()
		*out = nil
	} else {
		in.Delim('[')
		if *out == nil {
			if !in.IsDelim(']') {
				*out = make(watchlistSlice, 0, 0)
			} else {
				*out = watchlistSlice{}
			}
		} else {
			*out = (*out)[:0]
		}
		for !in.IsDelim(']') {
			var v1 Watchlist
			(v1).UnmarshalEasyJSON(in)
			*out = append(*out, v1)
			in.WantComma()
		}
		in.Delim(']')
	}
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca(out *jwriter.Writer, in watchlistSlice) {
	if in == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
		out.RawString("null")
	} else {
		out.RawByte('[')
		for v2, v3 := range in {
			if v2 > 0 {
				out.RawByte(',')
			}
			(v3).MarshalEasyJSON(out)
		}
		out.RawByte(']')
	}
}

// MarshalJSON supports json.Marshaler interface
func (v watchlistSlice) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v watchlistSlice) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *watchlistSlice) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *watchlistSlice) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca1(in *jlexer.Lexer, out *positionSlice) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		in.Skip()
		*out = nil
	} else {
		in.Delim('[')
		if *out == nil {
			if !in.IsDelim(']') {
				*out = make(positionSlice, 0, 0)
			} else {
				*out = positionSlice{}
			}
		} else {
			*out = (*out)[:0]
		}
		for !in.IsDelim(']') {
			var v4 Position
			(v4).UnmarshalEasyJSON(in)
			*out = append(*out, v4)
			in.WantComma()
		}
		in.Delim(']')
	}
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca1(out *jwriter.Writer, in positionSlice) {
	if in == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
		out.RawString("null")
	} else {
		out.RawByte('[')
		for v5, v6 := range in {
			if v5 > 0 {
				out.RawByte(',')
			}
			(v6).MarshalEasyJSON(out)
		}
		out.RawByte(']')
	}
}

// MarshalJSON supports json.Marshaler interface
func (v positionSlice) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca1(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v positionSlice) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca1(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *positionSlice) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca1(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *positionSlice) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca1(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca2(in *jlexer.Lexer, out *orderSlice) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		in.Skip()
		*out = nil
	} else {
		in.Delim('[')
		if *out == nil {
			if !in.IsDelim(']') {
				*out = make(orderSlice, 0, 0)
			} else {
				*out = orderSlice{}
			}
		} else {
			*out = (*out)[:0]
		}
		for !in.IsDelim(']') {
			var v7 Order
			(v7).UnmarshalEasyJSON(in)
			*out = append(*out, v7)
			in.WantComma()
		}
		in.Delim(']')
	}
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca2(out *jwriter.Writer, in orderSlice) {
	if in == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
		out.RawString("null")
	} else {
		out.RawByte('[')
		for v8, v9 := range in {
			if v8 > 0 {
				out.RawByte(',')
			}
			(v9).MarshalEasyJSON(out)
		}
		out.RawByte(']')
	}
}

// MarshalJSON supports json.Marshaler interface
func (v orderSlice) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca2(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v orderSlice) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca2(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *orderSlice) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca2(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *orderSlice) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca2(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca3(in *jlexer.Lexer, out *optionContractsResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "option_contracts":
			if in.IsNull() {
				in.Skip()
				out.OptionContracts = nil
			} else {
				in.Delim('[')
				if out.OptionContracts == nil {
					if !in.IsDelim(']') {
						out.OptionContracts = make([]OptionContract, 0, 0)
					} else {
						out.OptionContracts = []OptionContract{}
					}
				} else {
					out.OptionContracts = (out.OptionContracts)[:0]
				}
				for !in.IsDelim(']') {
					var v10 OptionContract
					(v10).UnmarshalEasyJSON(in)
					out.OptionContracts = append(out.OptionContracts, v10)
					in.WantComma()
				}
				in.Delim(']')
			}
		case "next_page_token":
			if in.IsNull() {
				in.Skip()
				out.NextPageToken = nil
			} else {
				if out.NextPageToken == nil {
					out.NextPageToken = new(string)
				}
				*out.NextPageToken = string(in.String())
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca3(out *jwriter.Writer, in optionContractsResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"option_contracts\":"
		out.RawString(prefix[1:])
		if in.OptionContracts == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v11, v12 := range in.OptionContracts {
				if v11 > 0 {
					out.RawByte(',')
				}
				(v12).MarshalEasyJSON(out)
			}
			out.RawByte(']')
		}
	}
	if in.NextPageToken != nil {
		const prefix string = ",\"next_page_token\":"
		out.RawString(prefix)
		out.String(string(*in.NextPageToken))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v optionContractsResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca3(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v optionContractsResponse) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca3(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *optionContractsResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca3(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *optionContractsResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca3(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca4(in *jlexer.Lexer, out *closeAllPositionsSlice) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		in.Skip()
		*out = nil
	} else {
		in.Delim('[')
		if *out == nil {
			if !in.IsDelim(']') {
				*out = make(closeAllPositionsSlice, 0, 1)
			} else {
				*out = closeAllPositionsSlice{}
			}
		} else {
			*out = (*out)[:0]
		}
		for !in.IsDelim(']') {
			var v13 closeAllPositionsResponse
			(v13).UnmarshalEasyJSON(in)
			*out = append(*out, v13)
			in.WantComma()
		}
		in.Delim(']')
	}
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca4(out *jwriter.Writer, in closeAllPositionsSlice) {
	if in == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
		out.RawString("null")
	} else {
		out.RawByte('[')
		for v14, v15 := range in {
			if v14 > 0 {
				out.RawByte(',')
			}
			(v15).MarshalEasyJSON(out)
		}
		out.RawByte(']')
	}
}

// MarshalJSON supports json.Marshaler interface
func (v closeAllPositionsSlice) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca4(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v closeAllPositionsSlice) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca4(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *closeAllPositionsSlice) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca4(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *closeAllPositionsSlice) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca4(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca5(in *jlexer.Lexer, out *closeAllPositionsResponse) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "symbol":
			out.Symbol = string(in.String())
		case "status":
			out.Status = int(in.Int())
		case "body":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Body).UnmarshalJSON(data))
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca5(out *jwriter.Writer, in closeAllPositionsResponse) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"symbol\":"
		out.RawString(prefix[1:])
		out.String(string(in.Symbol))
	}
	{
		const prefix string = ",\"status\":"
		out.RawString(prefix)
		out.Int(int(in.Status))
	}
	if len(in.Body) != 0 {
		const prefix string = ",\"body\":"
		out.RawString(prefix)
		out.Raw((in.Body).MarshalJSON())
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v closeAllPositionsResponse) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca5(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v closeAllPositionsResponse) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca5(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *closeAllPositionsResponse) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca5(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *closeAllPositionsResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca5(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca6(in *jlexer.Lexer, out *calendarDaySlice) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		in.Skip()
		*out = nil
	} else {
		in.Delim('[')
		if *out == nil {
			if !in.IsDelim(']') {
				*out = make(calendarDaySlice, 0, 1)
			} else {
				*out = calendarDaySlice{}
			}
		} else {
			*out = (*out)[:0]
		}
		for !in.IsDelim(']') {
			var v16 CalendarDay
			(v16).UnmarshalEasyJSON(in)
			*out = append(*out, v16)
			in.WantComma()
		}
		in.Delim(']')
	}
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca6(out *jwriter.Writer, in calendarDaySlice) {
	if in == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
		out.RawString("null")
	} else {
		out.RawByte('[')
		for v17, v18 := range in {
			if v17 > 0 {
				out.RawByte(',')
			}
			(v18).MarshalEasyJSON(out)
		}
		out.RawByte(']')
	}
}

// MarshalJSON supports json.Marshaler interface
func (v calendarDaySlice) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca6(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v calendarDaySlice) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca6(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *calendarDaySlice) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca6(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *calendarDaySlice) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca6(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca7(in *jlexer.Lexer, out *assetSlice) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		in.Skip()
		*out = nil
	} else {
		in.Delim('[')
		if *out == nil {
			if !in.IsDelim(']') {
				*out = make(assetSlice, 0, 0)
			} else {
				*out = assetSlice{}
			}
		} else {
			*out = (*out)[:0]
		}
		for !in.IsDelim(']') {
			var v19 Asset
			(v19).UnmarshalEasyJSON(in)
			*out = append(*out, v19)
			in.WantComma()
		}
		in.Delim(']')
	}
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca7(out *jwriter.Writer, in assetSlice) {
	if in == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
		out.RawString("null")
	} else {
		out.RawByte('[')
		for v20, v21 := range in {
			if v20 > 0 {
				out.RawByte(',')
			}
			(v21).MarshalEasyJSON(out)
		}
		out.RawByte(']')
	}
}

// MarshalJSON supports json.Marshaler interface
func (v assetSlice) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca7(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v assetSlice) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca7(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *assetSlice) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca7(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *assetSlice) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca7(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca8(in *jlexer.Lexer, out *announcementSlice) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		in.Skip()
		*out = nil
	} else {
		in.Delim('[')
		if *out == nil {
			if !in.IsDelim(']') {
				*out = make(announcementSlice, 0, 0)
			} else {
				*out = announcementSlice{}
			}
		} else {
			*out = (*out)[:0]
		}
		for !in.IsDelim(']') {
			var v22 Announcement
			(v22).UnmarshalEasyJSON(in)
			*out = append(*out, v22)
			in.WantComma()
		}
		in.Delim(']')
	}
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca8(out *jwriter.Writer, in announcementSlice) {
	if in == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
		out.RawString("null")
	} else {
		out.RawByte('[')
		for v23, v24 := range in {
			if v23 > 0 {
				out.RawByte(',')
			}
			(v24).MarshalEasyJSON(out)
		}
		out.RawByte(']')
	}
}

// MarshalJSON supports json.Marshaler interface
func (v announcementSlice) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca8(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v announcementSlice) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca8(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *announcementSlice) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca8(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *announcementSlice) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca8(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca9(in *jlexer.Lexer, out *accountSlice) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		in.Skip()
		*out = nil
	} else {
		in.Delim('[')
		if *out == nil {
			if !in.IsDelim(']') {
				*out = make(accountSlice, 0, 0)
			} else {
				*out = accountSlice{}
			}
		} else {
			*out = (*out)[:0]
		}
		for !in.IsDelim(']') {
			var v25 AccountActivity
			(v25).UnmarshalEasyJSON(in)
			*out = append(*out, v25)
			in.WantComma()
		}
		in.Delim(']')
	}
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca9(out *jwriter.Writer, in accountSlice) {
	if in == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
		out.RawString("null")
	} else {
		out.RawByte('[')
		for v26, v27 := range in {
			if v26 > 0 {
				out.RawByte(',')
			}
			(v27).MarshalEasyJSON(out)
		}
		out.RawByte(']')
	}
}

// MarshalJSON supports json.Marshaler interface
func (v accountSlice) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca9(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v accountSlice) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca9(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *accountSlice) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca9(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *accountSlice) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca9(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca10(in *jlexer.Lexer, out *Watchlist) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "account_id":
			out.AccountID = string(in.String())
		case "id":
			out.ID = string(in.String())
		case "created_at":
			out.CreatedAt = string(in.String())
		case "updated_at":
			out.UpdatedAt = string(in.String())
		case "name":
			out.Name = string(in.String())
		case "assets":
			if in.IsNull() {
				in.Skip()
				out.Assets = nil
			} else {
				in.Delim('[')
				if out.Assets == nil {
					if !in.IsDelim(']') {
						out.Assets = make([]Asset, 0, 0)
					} else {
						out.Assets = []Asset{}
					}
				} else {
					out.Assets = (out.Assets)[:0]
				}
				for !in.IsDelim(']') {
					var v28 Asset
					(v28).UnmarshalEasyJSON(in)
					out.Assets = append(out.Assets, v28)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca10(out *jwriter.Writer, in Watchlist) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"account_id\":"
		out.RawString(prefix[1:])
		out.String(string(in.AccountID))
	}
	{
		const prefix string = ",\"id\":"
		out.RawString(prefix)
		out.String(string(in.ID))
	}
	{
		const prefix string = ",\"created_at\":"
		out.RawString(prefix)
		out.String(string(in.CreatedAt))
	}
	{
		const prefix string = ",\"updated_at\":"
		out.RawString(prefix)
		out.String(string(in.UpdatedAt))
	}
	{
		const prefix string = ",\"name\":"
		out.RawString(prefix)
		out.String(string(in.Name))
	}
	{
		const prefix string = ",\"assets\":"
		out.RawString(prefix)
		if in.Assets == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v29, v30 := range in.Assets {
				if v29 > 0 {
					out.RawByte(',')
				}
				(v30).MarshalEasyJSON(out)
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v Watchlist) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca10(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Watchlist) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca10(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *Watchlist) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca10(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Watchlist) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca10(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca11(in *jlexer.Lexer, out *UpdateWatchlistRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "name":
			out.Name = string(in.String())
		case "symbols":
			if in.IsNull() {
				in.Skip()
				out.Symbols = nil
			} else {
				in.Delim('[')
				if out.Symbols == nil {
					if !in.IsDelim(']') {
						out.Symbols = make([]string, 0, 4)
					} else {
						out.Symbols = []string{}
					}
				} else {
					out.Symbols = (out.Symbols)[:0]
				}
				for !in.IsDelim(']') {
					var v31 string
					v31 = string(in.String())
					out.Symbols = append(out.Symbols, v31)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca11(out *jwriter.Writer, in UpdateWatchlistRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"name\":"
		out.RawString(prefix[1:])
		out.String(string(in.Name))
	}
	{
		const prefix string = ",\"symbols\":"
		out.RawString(prefix)
		if in.Symbols == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v32, v33 := range in.Symbols {
				if v32 > 0 {
					out.RawByte(',')
				}
				out.String(string(v33))
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v UpdateWatchlistRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca11(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v UpdateWatchlistRequest) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca11(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *UpdateWatchlistRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca11(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *UpdateWatchlistRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca11(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca12(in *jlexer.Lexer, out *TradeUpdate) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "at":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.At).UnmarshalJSON(data))
			}
		case "event":
			out.Event = string(in.String())
		case "event_id":
			out.EventID = string(in.String())
		case "execution_id":
			out.ExecutionID = string(in.String())
		case "order":
			(out.Order).UnmarshalEasyJSON(in)
		case "position_qty":
			if in.IsNull() {
				in.Skip()
				out.PositionQty = nil
			} else {
				if out.PositionQty == nil {
					out.PositionQty = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.PositionQty).UnmarshalJSON(data))
				}
			}
		case "price":
			if in.IsNull() {
				in.Skip()
				out.Price = nil
			} else {
				if out.Price == nil {
					out.Price = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.Price).UnmarshalJSON(data))
				}
			}
		case "qty":
			if in.IsNull() {
				in.Skip()
				out.Qty = nil
			} else {
				if out.Qty == nil {
					out.Qty = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.Qty).UnmarshalJSON(data))
				}
			}
		case "timestamp":
			if in.IsNull() {
				in.Skip()
				out.Timestamp = nil
			} else {
				if out.Timestamp == nil {
					out.Timestamp = new(time.Time)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.Timestamp).UnmarshalJSON(data))
				}
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca12(out *jwriter.Writer, in TradeUpdate) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"at\":"
		out.RawString(prefix[1:])
		out.Raw((in.At).MarshalJSON())
	}
	{
		const prefix string = ",\"event\":"
		out.RawString(prefix)
		out.String(string(in.Event))
	}
	{
		const prefix string = ",\"event_id\":"
		out.RawString(prefix)
		out.String(string(in.EventID))
	}
	{
		const prefix string = ",\"execution_id\":"
		out.RawString(prefix)
		out.String(string(in.ExecutionID))
	}
	{
		const prefix string = ",\"order\":"
		out.RawString(prefix)
		(in.Order).MarshalEasyJSON(out)
	}
	{
		const prefix string = ",\"position_qty\":"
		out.RawString(prefix)
		if in.PositionQty == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.PositionQty).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"price\":"
		out.RawString(prefix)
		if in.Price == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.Price).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"qty\":"
		out.RawString(prefix)
		if in.Qty == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.Qty).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"timestamp\":"
		out.RawString(prefix)
		if in.Timestamp == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.Timestamp).MarshalJSON())
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v TradeUpdate) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca12(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v TradeUpdate) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca12(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *TradeUpdate) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca12(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *TradeUpdate) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca12(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca13(in *jlexer.Lexer, out *RemoveSymbolFromWatchlistRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "symbol":
			out.Symbol = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca13(out *jwriter.Writer, in RemoveSymbolFromWatchlistRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"symbol\":"
		out.RawString(prefix[1:])
		out.String(string(in.Symbol))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v RemoveSymbolFromWatchlistRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca13(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v RemoveSymbolFromWatchlistRequest) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca13(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *RemoveSymbolFromWatchlistRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca13(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RemoveSymbolFromWatchlistRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca13(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca14(in *jlexer.Lexer, out *Position) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "asset_id":
			out.AssetID = string(in.String())
		case "symbol":
			out.Symbol = string(in.String())
		case "exchange":
			out.Exchange = string(in.String())
		case "asset_class":
			out.AssetClass = AssetClass(in.String())
		case "asset_marginable":
			out.AssetMarginable = bool(in.Bool())
		case "qty":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Qty).UnmarshalJSON(data))
			}
		case "qty_available":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.QtyAvailable).UnmarshalJSON(data))
			}
		case "avg_entry_price":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.AvgEntryPrice).UnmarshalJSON(data))
			}
		case "side":
			out.Side = string(in.String())
		case "market_value":
			if in.IsNull() {
				in.Skip()
				out.MarketValue = nil
			} else {
				if out.MarketValue == nil {
					out.MarketValue = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.MarketValue).UnmarshalJSON(data))
				}
			}
		case "cost_basis":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.CostBasis).UnmarshalJSON(data))
			}
		case "unrealized_pl":
			if in.IsNull() {
				in.Skip()
				out.UnrealizedPL = nil
			} else {
				if out.UnrealizedPL == nil {
					out.UnrealizedPL = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.UnrealizedPL).UnmarshalJSON(data))
				}
			}
		case "unrealized_plpc":
			if in.IsNull() {
				in.Skip()
				out.UnrealizedPLPC = nil
			} else {
				if out.UnrealizedPLPC == nil {
					out.UnrealizedPLPC = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.UnrealizedPLPC).UnmarshalJSON(data))
				}
			}
		case "unrealized_intraday_pl":
			if in.IsNull() {
				in.Skip()
				out.UnrealizedIntradayPL = nil
			} else {
				if out.UnrealizedIntradayPL == nil {
					out.UnrealizedIntradayPL = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.UnrealizedIntradayPL).UnmarshalJSON(data))
				}
			}
		case "unrealized_intraday_plpc":
			if in.IsNull() {
				in.Skip()
				out.UnrealizedIntradayPLPC = nil
			} else {
				if out.UnrealizedIntradayPLPC == nil {
					out.UnrealizedIntradayPLPC = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.UnrealizedIntradayPLPC).UnmarshalJSON(data))
				}
			}
		case "current_price":
			if in.IsNull() {
				in.Skip()
				out.CurrentPrice = nil
			} else {
				if out.CurrentPrice == nil {
					out.CurrentPrice = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.CurrentPrice).UnmarshalJSON(data))
				}
			}
		case "lastday_price":
			if in.IsNull() {
				in.Skip()
				out.LastdayPrice = nil
			} else {
				if out.LastdayPrice == nil {
					out.LastdayPrice = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.LastdayPrice).UnmarshalJSON(data))
				}
			}
		case "change_today":
			if in.IsNull() {
				in.Skip()
				out.ChangeToday = nil
			} else {
				if out.ChangeToday == nil {
					out.ChangeToday = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.ChangeToday).UnmarshalJSON(data))
				}
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca14(out *jwriter.Writer, in Position) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"asset_id\":"
		out.RawString(prefix[1:])
		out.String(string(in.AssetID))
	}
	{
		const prefix string = ",\"symbol\":"
		out.RawString(prefix)
		out.String(string(in.Symbol))
	}
	{
		const prefix string = ",\"exchange\":"
		out.RawString(prefix)
		out.String(string(in.Exchange))
	}
	{
		const prefix string = ",\"asset_class\":"
		out.RawString(prefix)
		out.String(string(in.AssetClass))
	}
	{
		const prefix string = ",\"asset_marginable\":"
		out.RawString(prefix)
		out.Bool(bool(in.AssetMarginable))
	}
	{
		const prefix string = ",\"qty\":"
		out.RawString(prefix)
		out.Raw((in.Qty).MarshalJSON())
	}
	{
		const prefix string = ",\"qty_available\":"
		out.RawString(prefix)
		out.Raw((in.QtyAvailable).MarshalJSON())
	}
	{
		const prefix string = ",\"avg_entry_price\":"
		out.RawString(prefix)
		out.Raw((in.AvgEntryPrice).MarshalJSON())
	}
	{
		const prefix string = ",\"side\":"
		out.RawString(prefix)
		out.String(string(in.Side))
	}
	{
		const prefix string = ",\"market_value\":"
		out.RawString(prefix)
		if in.MarketValue == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.MarketValue).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"cost_basis\":"
		out.RawString(prefix)
		out.Raw((in.CostBasis).MarshalJSON())
	}
	{
		const prefix string = ",\"unrealized_pl\":"
		out.RawString(prefix)
		if in.UnrealizedPL == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.UnrealizedPL).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"unrealized_plpc\":"
		out.RawString(prefix)
		if in.UnrealizedPLPC == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.UnrealizedPLPC).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"unrealized_intraday_pl\":"
		out.RawString(prefix)
		if in.UnrealizedIntradayPL == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.UnrealizedIntradayPL).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"unrealized_intraday_plpc\":"
		out.RawString(prefix)
		if in.UnrealizedIntradayPLPC == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.UnrealizedIntradayPLPC).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"current_price\":"
		out.RawString(prefix)
		if in.CurrentPrice == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.CurrentPrice).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"lastday_price\":"
		out.RawString(prefix)
		if in.LastdayPrice == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.LastdayPrice).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"change_today\":"
		out.RawString(prefix)
		if in.ChangeToday == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.ChangeToday).MarshalJSON())
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v Position) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca14(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Position) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca14(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *Position) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca14(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Position) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca14(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca15(in *jlexer.Lexer, out *PortfolioHistory) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "base_value":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.BaseValue).UnmarshalJSON(data))
			}
		case "equity":
			if in.IsNull() {
				in.Skip()
				out.Equity = nil
			} else {
				in.Delim('[')
				if out.Equity == nil {
					if !in.IsDelim(']') {
						out.Equity = make([]decimal.Decimal, 0, 4)
					} else {
						out.Equity = []decimal.Decimal{}
					}
				} else {
					out.Equity = (out.Equity)[:0]
				}
				for !in.IsDelim(']') {
					var v34 decimal.Decimal
					if data := in.Raw(); in.Ok() {
						in.AddError((v34).UnmarshalJSON(data))
					}
					out.Equity = append(out.Equity, v34)
					in.WantComma()
				}
				in.Delim(']')
			}
		case "profit_loss":
			if in.IsNull() {
				in.Skip()
				out.ProfitLoss = nil
			} else {
				in.Delim('[')
				if out.ProfitLoss == nil {
					if !in.IsDelim(']') {
						out.ProfitLoss = make([]decimal.Decimal, 0, 4)
					} else {
						out.ProfitLoss = []decimal.Decimal{}
					}
				} else {
					out.ProfitLoss = (out.ProfitLoss)[:0]
				}
				for !in.IsDelim(']') {
					var v35 decimal.Decimal
					if data := in.Raw(); in.Ok() {
						in.AddError((v35).UnmarshalJSON(data))
					}
					out.ProfitLoss = append(out.ProfitLoss, v35)
					in.WantComma()
				}
				in.Delim(']')
			}
		case "profit_loss_pct":
			if in.IsNull() {
				in.Skip()
				out.ProfitLossPct = nil
			} else {
				in.Delim('[')
				if out.ProfitLossPct == nil {
					if !in.IsDelim(']') {
						out.ProfitLossPct = make([]decimal.Decimal, 0, 4)
					} else {
						out.ProfitLossPct = []decimal.Decimal{}
					}
				} else {
					out.ProfitLossPct = (out.ProfitLossPct)[:0]
				}
				for !in.IsDelim(']') {
					var v36 decimal.Decimal
					if data := in.Raw(); in.Ok() {
						in.AddError((v36).UnmarshalJSON(data))
					}
					out.ProfitLossPct = append(out.ProfitLossPct, v36)
					in.WantComma()
				}
				in.Delim(']')
			}
		case "timeframe":
			out.Timeframe = TimeFrame(in.String())
		case "timestamp":
			if in.IsNull() {
				in.Skip()
				out.Timestamp = nil
			} else {
				in.Delim('[')
				if out.Timestamp == nil {
					if !in.IsDelim(']') {
						out.Timestamp = make([]int64, 0, 8)
					} else {
						out.Timestamp = []int64{}
					}
				} else {
					out.Timestamp = (out.Timestamp)[:0]
				}
				for !in.IsDelim(']') {
					var v37 int64
					v37 = int64(in.Int64())
					out.Timestamp = append(out.Timestamp, v37)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca15(out *jwriter.Writer, in PortfolioHistory) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"base_value\":"
		out.RawString(prefix[1:])
		out.Raw((in.BaseValue).MarshalJSON())
	}
	{
		const prefix string = ",\"equity\":"
		out.RawString(prefix)
		if in.Equity == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v38, v39 := range in.Equity {
				if v38 > 0 {
					out.RawByte(',')
				}
				out.Raw((v39).MarshalJSON())
			}
			out.RawByte(']')
		}
	}
	{
		const prefix string = ",\"profit_loss\":"
		out.RawString(prefix)
		if in.ProfitLoss == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v40, v41 := range in.ProfitLoss {
				if v40 > 0 {
					out.RawByte(',')
				}
				out.Raw((v41).MarshalJSON())
			}
			out.RawByte(']')
		}
	}
	{
		const prefix string = ",\"profit_loss_pct\":"
		out.RawString(prefix)
		if in.ProfitLossPct == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v42, v43 := range in.ProfitLossPct {
				if v42 > 0 {
					out.RawByte(',')
				}
				out.Raw((v43).MarshalJSON())
			}
			out.RawByte(']')
		}
	}
	{
		const prefix string = ",\"timeframe\":"
		out.RawString(prefix)
		out.String(string(in.Timeframe))
	}
	{
		const prefix string = ",\"timestamp\":"
		out.RawString(prefix)
		if in.Timestamp == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v44, v45 := range in.Timestamp {
				if v44 > 0 {
					out.RawByte(',')
				}
				out.Int64(int64(v45))
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v PortfolioHistory) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca15(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v PortfolioHistory) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca15(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *PortfolioHistory) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca15(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *PortfolioHistory) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca15(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca16(in *jlexer.Lexer, out *Order) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.ID = string(in.String())
		case "client_order_id":
			out.ClientOrderID = string(in.String())
		case "created_at":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.CreatedAt).UnmarshalJSON(data))
			}
		case "updated_at":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.UpdatedAt).UnmarshalJSON(data))
			}
		case "submitted_at":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.SubmittedAt).UnmarshalJSON(data))
			}
		case "filled_at":
			if in.IsNull() {
				in.Skip()
				out.FilledAt = nil
			} else {
				if out.FilledAt == nil {
					out.FilledAt = new(time.Time)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.FilledAt).UnmarshalJSON(data))
				}
			}
		case "expired_at":
			if in.IsNull() {
				in.Skip()
				out.ExpiredAt = nil
			} else {
				if out.ExpiredAt == nil {
					out.ExpiredAt = new(time.Time)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.ExpiredAt).UnmarshalJSON(data))
				}
			}
		case "canceled_at":
			if in.IsNull() {
				in.Skip()
				out.CanceledAt = nil
			} else {
				if out.CanceledAt == nil {
					out.CanceledAt = new(time.Time)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.CanceledAt).UnmarshalJSON(data))
				}
			}
		case "failed_at":
			if in.IsNull() {
				in.Skip()
				out.FailedAt = nil
			} else {
				if out.FailedAt == nil {
					out.FailedAt = new(time.Time)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.FailedAt).UnmarshalJSON(data))
				}
			}
		case "replaced_at":
			if in.IsNull() {
				in.Skip()
				out.ReplacedAt = nil
			} else {
				if out.ReplacedAt == nil {
					out.ReplacedAt = new(time.Time)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.ReplacedAt).UnmarshalJSON(data))
				}
			}
		case "replaced_by":
			if in.IsNull() {
				in.Skip()
				out.ReplacedBy = nil
			} else {
				if out.ReplacedBy == nil {
					out.ReplacedBy = new(string)
				}
				*out.ReplacedBy = string(in.String())
			}
		case "replaces":
			if in.IsNull() {
				in.Skip()
				out.Replaces = nil
			} else {
				if out.Replaces == nil {
					out.Replaces = new(string)
				}
				*out.Replaces = string(in.String())
			}
		case "asset_id":
			out.AssetID = string(in.String())
		case "symbol":
			out.Symbol = string(in.String())
		case "asset_class":
			out.AssetClass = AssetClass(in.String())
		case "order_class":
			out.OrderClass = OrderClass(in.String())
		case "type":
			out.Type = OrderType(in.String())
		case "side":
			out.Side = Side(in.String())
		case "position_intent":
			out.PositionIntent = PositionIntent(in.String())
		case "time_in_force":
			out.TimeInForce = TimeInForce(in.String())
		case "status":
			out.Status = string(in.String())
		case "notional":
			if in.IsNull() {
				in.Skip()
				out.Notional = nil
			} else {
				if out.Notional == nil {
					out.Notional = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.Notional).UnmarshalJSON(data))
				}
			}
		case "qty":
			if in.IsNull() {
				in.Skip()
				out.Qty = nil
			} else {
				if out.Qty == nil {
					out.Qty = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.Qty).UnmarshalJSON(data))
				}
			}
		case "filled_qty":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.FilledQty).UnmarshalJSON(data))
			}
		case "filled_avg_price":
			if in.IsNull() {
				in.Skip()
				out.FilledAvgPrice = nil
			} else {
				if out.FilledAvgPrice == nil {
					out.FilledAvgPrice = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.FilledAvgPrice).UnmarshalJSON(data))
				}
			}
		case "limit_price":
			if in.IsNull() {
				in.Skip()
				out.LimitPrice = nil
			} else {
				if out.LimitPrice == nil {
					out.LimitPrice = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.LimitPrice).UnmarshalJSON(data))
				}
			}
		case "stop_price":
			if in.IsNull() {
				in.Skip()
				out.StopPrice = nil
			} else {
				if out.StopPrice == nil {
					out.StopPrice = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.StopPrice).UnmarshalJSON(data))
				}
			}
		case "trail_price":
			if in.IsNull() {
				in.Skip()
				out.TrailPrice = nil
			} else {
				if out.TrailPrice == nil {
					out.TrailPrice = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.TrailPrice).UnmarshalJSON(data))
				}
			}
		case "trail_percent":
			if in.IsNull() {
				in.Skip()
				out.TrailPercent = nil
			} else {
				if out.TrailPercent == nil {
					out.TrailPercent = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.TrailPercent).UnmarshalJSON(data))
				}
			}
		case "hwm":
			if in.IsNull() {
				in.Skip()
				out.HWM = nil
			} else {
				if out.HWM == nil {
					out.HWM = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.HWM).UnmarshalJSON(data))
				}
			}
		case "extended_hours":
			out.ExtendedHours = bool(in.Bool())
		case "ratio_qty":
			if in.IsNull() {
				in.Skip()
				out.RatioQty = nil
			} else {
				if out.RatioQty == nil {
					out.RatioQty = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.RatioQty).UnmarshalJSON(data))
				}
			}
		case "legs":
			if in.IsNull() {
				in.Skip()
				out.Legs = nil
			} else {
				in.Delim('[')
				if out.Legs == nil {
					if !in.IsDelim(']') {
						out.Legs = make([]Order, 0, 0)
					} else {
						out.Legs = []Order{}
					}
				} else {
					out.Legs = (out.Legs)[:0]
				}
				for !in.IsDelim(']') {
					var v46 Order
					(v46).UnmarshalEasyJSON(in)
					out.Legs = append(out.Legs, v46)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca16(out *jwriter.Writer, in Order) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"id\":"
		out.RawString(prefix[1:])
		out.String(string(in.ID))
	}
	{
		const prefix string = ",\"client_order_id\":"
		out.RawString(prefix)
		out.String(string(in.ClientOrderID))
	}
	{
		const prefix string = ",\"created_at\":"
		out.RawString(prefix)
		out.Raw((in.CreatedAt).MarshalJSON())
	}
	{
		const prefix string = ",\"updated_at\":"
		out.RawString(prefix)
		out.Raw((in.UpdatedAt).MarshalJSON())
	}
	{
		const prefix string = ",\"submitted_at\":"
		out.RawString(prefix)
		out.Raw((in.SubmittedAt).MarshalJSON())
	}
	{
		const prefix string = ",\"filled_at\":"
		out.RawString(prefix)
		if in.FilledAt == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.FilledAt).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"expired_at\":"
		out.RawString(prefix)
		if in.ExpiredAt == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.ExpiredAt).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"canceled_at\":"
		out.RawString(prefix)
		if in.CanceledAt == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.CanceledAt).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"failed_at\":"
		out.RawString(prefix)
		if in.FailedAt == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.FailedAt).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"replaced_at\":"
		out.RawString(prefix)
		if in.ReplacedAt == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.ReplacedAt).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"replaced_by\":"
		out.RawString(prefix)
		if in.ReplacedBy == nil {
			out.RawString("null")
		} else {
			out.String(string(*in.ReplacedBy))
		}
	}
	{
		const prefix string = ",\"replaces\":"
		out.RawString(prefix)
		if in.Replaces == nil {
			out.RawString("null")
		} else {
			out.String(string(*in.Replaces))
		}
	}
	{
		const prefix string = ",\"asset_id\":"
		out.RawString(prefix)
		out.String(string(in.AssetID))
	}
	{
		const prefix string = ",\"symbol\":"
		out.RawString(prefix)
		out.String(string(in.Symbol))
	}
	{
		const prefix string = ",\"asset_class\":"
		out.RawString(prefix)
		out.String(string(in.AssetClass))
	}
	{
		const prefix string = ",\"order_class\":"
		out.RawString(prefix)
		out.String(string(in.OrderClass))
	}
	{
		const prefix string = ",\"type\":"
		out.RawString(prefix)
		out.String(string(in.Type))
	}
	{
		const prefix string = ",\"side\":"
		out.RawString(prefix)
		out.String(string(in.Side))
	}
	{
		const prefix string = ",\"position_intent\":"
		out.RawString(prefix)
		out.String(string(in.PositionIntent))
	}
	{
		const prefix string = ",\"time_in_force\":"
		out.RawString(prefix)
		out.String(string(in.TimeInForce))
	}
	{
		const prefix string = ",\"status\":"
		out.RawString(prefix)
		out.String(string(in.Status))
	}
	{
		const prefix string = ",\"notional\":"
		out.RawString(prefix)
		if in.Notional == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.Notional).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"qty\":"
		out.RawString(prefix)
		if in.Qty == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.Qty).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"filled_qty\":"
		out.RawString(prefix)
		out.Raw((in.FilledQty).MarshalJSON())
	}
	{
		const prefix string = ",\"filled_avg_price\":"
		out.RawString(prefix)
		if in.FilledAvgPrice == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.FilledAvgPrice).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"limit_price\":"
		out.RawString(prefix)
		if in.LimitPrice == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.LimitPrice).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"stop_price\":"
		out.RawString(prefix)
		if in.StopPrice == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.StopPrice).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"trail_price\":"
		out.RawString(prefix)
		if in.TrailPrice == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.TrailPrice).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"trail_percent\":"
		out.RawString(prefix)
		if in.TrailPercent == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.TrailPercent).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"hwm\":"
		out.RawString(prefix)
		if in.HWM == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.HWM).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"extended_hours\":"
		out.RawString(prefix)
		out.Bool(bool(in.ExtendedHours))
	}
	{
		const prefix string = ",\"ratio_qty\":"
		out.RawString(prefix)
		if in.RatioQty == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.RatioQty).MarshalJSON())
		}
	}
	{
		const prefix string = ",\"legs\":"
		out.RawString(prefix)
		if in.Legs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v47, v48 := range in.Legs {
				if v47 > 0 {
					out.RawByte(',')
				}
				(v48).MarshalEasyJSON(out)
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v Order) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca16(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Order) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca16(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *Order) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca16(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Order) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca16(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca17(in *jlexer.Lexer, out *OptionDeliverable) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "type":
			out.Type = DeliverableType(in.String())
		case "symbol":
			out.Symbol = string(in.String())
		case "asset_id":
			if in.IsNull() {
				in.Skip()
				out.AssetID = nil
			} else {
				if out.AssetID == nil {
					out.AssetID = new(string)
				}
				*out.AssetID = string(in.String())
			}
		case "amount":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Amount).UnmarshalJSON(data))
			}
		case "allocation_percentage":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.AllocationPercentage).UnmarshalJSON(data))
			}
		case "settlement_type":
			out.SettlementType = DeliverableSettlementType(in.String())
		case "settlement_method":
			out.SettlementMethod = DeliverableSettlementMethod(in.String())
		case "delayed_settlement":
			out.DelayedSettlement = bool(in.Bool())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca17(out *jwriter.Writer, in OptionDeliverable) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"type\":"
		out.RawString(prefix[1:])
		out.String(string(in.Type))
	}
	{
		const prefix string = ",\"symbol\":"
		out.RawString(prefix)
		out.String(string(in.Symbol))
	}
	if in.AssetID != nil {
		const prefix string = ",\"asset_id\":"
		out.RawString(prefix)
		out.String(string(*in.AssetID))
	}
	{
		const prefix string = ",\"amount\":"
		out.RawString(prefix)
		out.Raw((in.Amount).MarshalJSON())
	}
	{
		const prefix string = ",\"allocation_percentage\":"
		out.RawString(prefix)
		out.Raw((in.AllocationPercentage).MarshalJSON())
	}
	{
		const prefix string = ",\"settlement_type\":"
		out.RawString(prefix)
		out.String(string(in.SettlementType))
	}
	{
		const prefix string = ",\"settlement_method\":"
		out.RawString(prefix)
		out.String(string(in.SettlementMethod))
	}
	{
		const prefix string = ",\"delayed_settlement\":"
		out.RawString(prefix)
		out.Bool(bool(in.DelayedSettlement))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v OptionDeliverable) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca17(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v OptionDeliverable) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca17(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *OptionDeliverable) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca17(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *OptionDeliverable) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca17(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca18(in *jlexer.Lexer, out *OptionContract) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.ID = string(in.String())
		case "symbol":
			out.Symbol = string(in.String())
		case "name":
			out.Name = string(in.String())
		case "status":
			out.Status = OptionStatus(in.String())
		case "tradable":
			out.Tradable = bool(in.Bool())
		case "expiration_date":
			if data := in.UnsafeBytes(); in.Ok() {
				in.AddError((out.ExpirationDate).UnmarshalText(data))
			}
		case "root_symbol":
			if in.IsNull() {
				in.Skip()
				out.RootSymbol = nil
			} else {
				if out.RootSymbol == nil {
					out.RootSymbol = new(string)
				}
				*out.RootSymbol = string(in.String())
			}
		case "underlying_symbol":
			out.UnderlyingSymbol = string(in.String())
		case "underlying_asset_id":
			out.UnderlyingAssetID = string(in.String())
		case "type":
			out.Type = OptionType(in.String())
		case "style":
			out.Style = OptionStyle(in.String())
		case "strike_price":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.StrikePrice).UnmarshalJSON(data))
			}
		case "multiplier":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Multiplier).UnmarshalJSON(data))
			}
		case "size":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Size).UnmarshalJSON(data))
			}
		case "open_interest":
			if in.IsNull() {
				in.Skip()
				out.OpenInterest = nil
			} else {
				if out.OpenInterest == nil {
					out.OpenInterest = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.OpenInterest).UnmarshalJSON(data))
				}
			}
		case "open_interest_date":
			if in.IsNull() {
				in.Skip()
				out.OpenInterestDate = nil
			} else {
				if out.OpenInterestDate == nil {
					out.OpenInterestDate = new(civil.Date)
				}
				if data := in.UnsafeBytes(); in.Ok() {
					in.AddError((*out.OpenInterestDate).UnmarshalText(data))
				}
			}
		case "close_price":
			if in.IsNull() {
				in.Skip()
				out.ClosePrice = nil
			} else {
				if out.ClosePrice == nil {
					out.ClosePrice = new(decimal.Decimal)
				}
				if data := in.Raw(); in.Ok() {
					in.AddError((*out.ClosePrice).UnmarshalJSON(data))
				}
			}
		case "close_price_date":
			if in.IsNull() {
				in.Skip()
				out.ClosePriceDate = nil
			} else {
				if out.ClosePriceDate == nil {
					out.ClosePriceDate = new(civil.Date)
				}
				if data := in.UnsafeBytes(); in.Ok() {
					in.AddError((*out.ClosePriceDate).UnmarshalText(data))
				}
			}
		case "deliverables":
			if in.IsNull() {
				in.Skip()
				out.Deliverables = nil
			} else {
				in.Delim('[')
				if out.Deliverables == nil {
					if !in.IsDelim(']') {
						out.Deliverables = make([]OptionDeliverable, 0, 0)
					} else {
						out.Deliverables = []OptionDeliverable{}
					}
				} else {
					out.Deliverables = (out.Deliverables)[:0]
				}
				for !in.IsDelim(']') {
					var v49 OptionDeliverable
					(v49).UnmarshalEasyJSON(in)
					out.Deliverables = append(out.Deliverables, v49)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca18(out *jwriter.Writer, in OptionContract) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"id\":"
		out.RawString(prefix[1:])
		out.String(string(in.ID))
	}
	{
		const prefix string = ",\"symbol\":"
		out.RawString(prefix)
		out.String(string(in.Symbol))
	}
	{
		const prefix string = ",\"name\":"
		out.RawString(prefix)
		out.String(string(in.Name))
	}
	{
		const prefix string = ",\"status\":"
		out.RawString(prefix)
		out.String(string(in.Status))
	}
	{
		const prefix string = ",\"tradable\":"
		out.RawString(prefix)
		out.Bool(bool(in.Tradable))
	}
	{
		const prefix string = ",\"expiration_date\":"
		out.RawString(prefix)
		out.RawText((in.ExpirationDate).MarshalText())
	}
	if in.RootSymbol != nil {
		const prefix string = ",\"root_symbol\":"
		out.RawString(prefix)
		out.String(string(*in.RootSymbol))
	}
	{
		const prefix string = ",\"underlying_symbol\":"
		out.RawString(prefix)
		out.String(string(in.UnderlyingSymbol))
	}
	{
		const prefix string = ",\"underlying_asset_id\":"
		out.RawString(prefix)
		out.String(string(in.UnderlyingAssetID))
	}
	{
		const prefix string = ",\"type\":"
		out.RawString(prefix)
		out.String(string(in.Type))
	}
	{
		const prefix string = ",\"style\":"
		out.RawString(prefix)
		out.String(string(in.Style))
	}
	{
		const prefix string = ",\"strike_price\":"
		out.RawString(prefix)
		out.Raw((in.StrikePrice).MarshalJSON())
	}
	{
		const prefix string = ",\"multiplier\":"
		out.RawString(prefix)
		out.Raw((in.Multiplier).MarshalJSON())
	}
	{
		const prefix string = ",\"size\":"
		out.RawString(prefix)
		out.Raw((in.Size).MarshalJSON())
	}
	{
		const prefix string = ",\"open_interest\":"
		out.RawString(prefix)
		if in.OpenInterest == nil {
			out.RawString("null")
		} else {
			out.Raw((*in.OpenInterest).MarshalJSON())
		}
	}
	if in.OpenInterestDate != nil {
		const prefix string = ",\"open_interest_date\":"
		out.RawString(prefix)
		out.RawText((*in.OpenInterestDate).MarshalText())
	}
	if in.ClosePrice != nil {
		const prefix string = ",\"close_price\":"
		out.RawString(prefix)
		out.Raw((*in.ClosePrice).MarshalJSON())
	}
	if in.ClosePriceDate != nil {
		const prefix string = ",\"close_price_date\":"
		out.RawString(prefix)
		out.RawText((*in.ClosePriceDate).MarshalText())
	}
	if len(in.Deliverables) != 0 {
		const prefix string = ",\"deliverables\":"
		out.RawString(prefix)
		{
			out.RawByte('[')
			for v50, v51 := range in.Deliverables {
				if v50 > 0 {
					out.RawByte(',')
				}
				(v51).MarshalEasyJSON(out)
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v OptionContract) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca18(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v OptionContract) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca18(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *OptionContract) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca18(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *OptionContract) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca18(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca19(in *jlexer.Lexer, out *CreateWatchlistRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "name":
			out.Name = string(in.String())
		case "symbols":
			if in.IsNull() {
				in.Skip()
				out.Symbols = nil
			} else {
				in.Delim('[')
				if out.Symbols == nil {
					if !in.IsDelim(']') {
						out.Symbols = make([]string, 0, 4)
					} else {
						out.Symbols = []string{}
					}
				} else {
					out.Symbols = (out.Symbols)[:0]
				}
				for !in.IsDelim(']') {
					var v52 string
					v52 = string(in.String())
					out.Symbols = append(out.Symbols, v52)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca19(out *jwriter.Writer, in CreateWatchlistRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"name\":"
		out.RawString(prefix[1:])
		out.String(string(in.Name))
	}
	{
		const prefix string = ",\"symbols\":"
		out.RawString(prefix)
		if in.Symbols == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v53, v54 := range in.Symbols {
				if v53 > 0 {
					out.RawByte(',')
				}
				out.String(string(v54))
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v CreateWatchlistRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca19(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v CreateWatchlistRequest) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca19(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *CreateWatchlistRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca19(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CreateWatchlistRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca19(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca20(in *jlexer.Lexer, out *Clock) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "timestamp":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Timestamp).UnmarshalJSON(data))
			}
		case "is_open":
			out.IsOpen = bool(in.Bool())
		case "next_open":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.NextOpen).UnmarshalJSON(data))
			}
		case "next_close":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.NextClose).UnmarshalJSON(data))
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca20(out *jwriter.Writer, in Clock) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"timestamp\":"
		out.RawString(prefix[1:])
		out.Raw((in.Timestamp).MarshalJSON())
	}
	{
		const prefix string = ",\"is_open\":"
		out.RawString(prefix)
		out.Bool(bool(in.IsOpen))
	}
	{
		const prefix string = ",\"next_open\":"
		out.RawString(prefix)
		out.Raw((in.NextOpen).MarshalJSON())
	}
	{
		const prefix string = ",\"next_close\":"
		out.RawString(prefix)
		out.Raw((in.NextClose).MarshalJSON())
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v Clock) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca20(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Clock) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca20(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *Clock) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca20(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Clock) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca20(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca21(in *jlexer.Lexer, out *CalendarDay) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "date":
			out.Date = string(in.String())
		case "open":
			out.Open = string(in.String())
		case "close":
			out.Close = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca21(out *jwriter.Writer, in CalendarDay) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"date\":"
		out.RawString(prefix[1:])
		out.String(string(in.Date))
	}
	{
		const prefix string = ",\"open\":"
		out.RawString(prefix)
		out.String(string(in.Open))
	}
	{
		const prefix string = ",\"close\":"
		out.RawString(prefix)
		out.String(string(in.Close))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v CalendarDay) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca21(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v CalendarDay) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca21(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *CalendarDay) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca21(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CalendarDay) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca21(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca22(in *jlexer.Lexer, out *Asset) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.ID = string(in.String())
		case "class":
			out.Class = AssetClass(in.String())
		case "exchange":
			out.Exchange = string(in.String())
		case "symbol":
			out.Symbol = string(in.String())
		case "name":
			out.Name = string(in.String())
		case "status":
			out.Status = AssetStatus(in.String())
		case "tradable":
			out.Tradable = bool(in.Bool())
		case "marginable":
			out.Marginable = bool(in.Bool())
		case "maintenance_margin_requirement":
			out.MaintenanceMarginRequirement = uint(in.Uint())
		case "shortable":
			out.Shortable = bool(in.Bool())
		case "easy_to_borrow":
			out.EasyToBorrow = bool(in.Bool())
		case "fractionable":
			out.Fractionable = bool(in.Bool())
		case "attributes":
			if in.IsNull() {
				in.Skip()
				out.Attributes = nil
			} else {
				in.Delim('[')
				if out.Attributes == nil {
					if !in.IsDelim(']') {
						out.Attributes = make([]string, 0, 4)
					} else {
						out.Attributes = []string{}
					}
				} else {
					out.Attributes = (out.Attributes)[:0]
				}
				for !in.IsDelim(']') {
					var v55 string
					v55 = string(in.String())
					out.Attributes = append(out.Attributes, v55)
					in.WantComma()
				}
				in.Delim(']')
			}
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca22(out *jwriter.Writer, in Asset) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"id\":"
		out.RawString(prefix[1:])
		out.String(string(in.ID))
	}
	{
		const prefix string = ",\"class\":"
		out.RawString(prefix)
		out.String(string(in.Class))
	}
	{
		const prefix string = ",\"exchange\":"
		out.RawString(prefix)
		out.String(string(in.Exchange))
	}
	{
		const prefix string = ",\"symbol\":"
		out.RawString(prefix)
		out.String(string(in.Symbol))
	}
	{
		const prefix string = ",\"name\":"
		out.RawString(prefix)
		out.String(string(in.Name))
	}
	{
		const prefix string = ",\"status\":"
		out.RawString(prefix)
		out.String(string(in.Status))
	}
	{
		const prefix string = ",\"tradable\":"
		out.RawString(prefix)
		out.Bool(bool(in.Tradable))
	}
	{
		const prefix string = ",\"marginable\":"
		out.RawString(prefix)
		out.Bool(bool(in.Marginable))
	}
	{
		const prefix string = ",\"maintenance_margin_requirement\":"
		out.RawString(prefix)
		out.Uint(uint(in.MaintenanceMarginRequirement))
	}
	{
		const prefix string = ",\"shortable\":"
		out.RawString(prefix)
		out.Bool(bool(in.Shortable))
	}
	{
		const prefix string = ",\"easy_to_borrow\":"
		out.RawString(prefix)
		out.Bool(bool(in.EasyToBorrow))
	}
	{
		const prefix string = ",\"fractionable\":"
		out.RawString(prefix)
		out.Bool(bool(in.Fractionable))
	}
	{
		const prefix string = ",\"attributes\":"
		out.RawString(prefix)
		if in.Attributes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
			out.RawString("null")
		} else {
			out.RawByte('[')
			for v56, v57 := range in.Attributes {
				if v56 > 0 {
					out.RawByte(',')
				}
				out.String(string(v57))
			}
			out.RawByte(']')
		}
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v Asset) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca22(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Asset) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca22(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *Asset) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca22(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Asset) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca22(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca23(in *jlexer.Lexer, out *Announcement) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.ID = string(in.String())
		case "corporate_actions_id":
			out.CorporateActionsID = string(in.String())
		case "ca_type":
			out.CAType = string(in.String())
		case "ca_sub_type":
			out.CASubType = string(in.String())
		case "initiating_symbol":
			out.InitiatingSymbol = string(in.String())
		case "initiating_original_cusip":
			out.InitiatingOriginalCusip = string(in.String())
		case "target_symbol":
			out.TargetSymbol = string(in.String())
		case "target_original_cusip":
			out.TargetOriginalCusip = string(in.String())
		case "declaration_date":
			out.DeclarationDate = string(in.String())
		case "expiration_date":
			out.ExpirationDate = string(in.String())
		case "record_date":
			out.RecordDate = string(in.String())
		case "payable_date":
			out.PayableDate = string(in.String())
		case "cash":
			out.Cash = string(in.String())
		case "old_rate":
			out.OldRate = string(in.String())
		case "new_rate":
			out.NewRate = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca23(out *jwriter.Writer, in Announcement) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"id\":"
		out.RawString(prefix[1:])
		out.String(string(in.ID))
	}
	{
		const prefix string = ",\"corporate_actions_id\":"
		out.RawString(prefix)
		out.String(string(in.CorporateActionsID))
	}
	{
		const prefix string = ",\"ca_type\":"
		out.RawString(prefix)
		out.String(string(in.CAType))
	}
	{
		const prefix string = ",\"ca_sub_type\":"
		out.RawString(prefix)
		out.String(string(in.CASubType))
	}
	{
		const prefix string = ",\"initiating_symbol\":"
		out.RawString(prefix)
		out.String(string(in.InitiatingSymbol))
	}
	{
		const prefix string = ",\"initiating_original_cusip\":"
		out.RawString(prefix)
		out.String(string(in.InitiatingOriginalCusip))
	}
	{
		const prefix string = ",\"target_symbol\":"
		out.RawString(prefix)
		out.String(string(in.TargetSymbol))
	}
	{
		const prefix string = ",\"target_original_cusip\":"
		out.RawString(prefix)
		out.String(string(in.TargetOriginalCusip))
	}
	{
		const prefix string = ",\"declaration_date\":"
		out.RawString(prefix)
		out.String(string(in.DeclarationDate))
	}
	{
		const prefix string = ",\"expiration_date\":"
		out.RawString(prefix)
		out.String(string(in.ExpirationDate))
	}
	{
		const prefix string = ",\"record_date\":"
		out.RawString(prefix)
		out.String(string(in.RecordDate))
	}
	{
		const prefix string = ",\"payable_date\":"
		out.RawString(prefix)
		out.String(string(in.PayableDate))
	}
	{
		const prefix string = ",\"cash\":"
		out.RawString(prefix)
		out.String(string(in.Cash))
	}
	{
		const prefix string = ",\"old_rate\":"
		out.RawString(prefix)
		out.String(string(in.OldRate))
	}
	{
		const prefix string = ",\"new_rate\":"
		out.RawString(prefix)
		out.String(string(in.NewRate))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v Announcement) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca23(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Announcement) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca23(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *Announcement) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca23(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Announcement) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca23(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca24(in *jlexer.Lexer, out *AddSymbolToWatchlistRequest) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "symbol":
			out.Symbol = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca24(out *jwriter.Writer, in AddSymbolToWatchlistRequest) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"symbol\":"
		out.RawString(prefix[1:])
		out.String(string(in.Symbol))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v AddSymbolToWatchlistRequest) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca24(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v AddSymbolToWatchlistRequest) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca24(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *AddSymbolToWatchlistRequest) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca24(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *AddSymbolToWatchlistRequest) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca24(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca25(in *jlexer.Lexer, out *AccountConfigurations) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "dtbp_check":
			out.DTBPCheck = DTBPCheck(in.String())
		case "no_shorting":
			out.NoShorting = bool(in.Bool())
		case "trade_confirm_email":
			out.TradeConfirmEmail = TradeConfirmEmail(in.String())
		case "trade_suspended_by_user":
			out.TradeSuspendedByUser = bool(in.Bool())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca25(out *jwriter.Writer, in AccountConfigurations) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"dtbp_check\":"
		out.RawString(prefix[1:])
		out.String(string(in.DTBPCheck))
	}
	{
		const prefix string = ",\"no_shorting\":"
		out.RawString(prefix)
		out.Bool(bool(in.NoShorting))
	}
	{
		const prefix string = ",\"trade_confirm_email\":"
		out.RawString(prefix)
		out.String(string(in.TradeConfirmEmail))
	}
	{
		const prefix string = ",\"trade_suspended_by_user\":"
		out.RawString(prefix)
		out.Bool(bool(in.TradeSuspendedByUser))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v AccountConfigurations) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca25(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v AccountConfigurations) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca25(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *AccountConfigurations) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca25(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *AccountConfigurations) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca25(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca26(in *jlexer.Lexer, out *AccountActivity) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.ID = string(in.String())
		case "activity_type":
			out.ActivityType = string(in.String())
		case "transaction_time":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.TransactionTime).UnmarshalJSON(data))
			}
		case "type":
			out.Type = string(in.String())
		case "price":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Price).UnmarshalJSON(data))
			}
		case "qty":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Qty).UnmarshalJSON(data))
			}
		case "side":
			out.Side = string(in.String())
		case "symbol":
			out.Symbol = string(in.String())
		case "leaves_qty":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.LeavesQty).UnmarshalJSON(data))
			}
		case "cum_qty":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.CumQty).UnmarshalJSON(data))
			}
		case "date":
			if data := in.UnsafeBytes(); in.Ok() {
				in.AddError((out.Date).UnmarshalText(data))
			}
		case "net_amount":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.NetAmount).UnmarshalJSON(data))
			}
		case "description":
			out.Description = string(in.String())
		case "per_share_amount":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.PerShareAmount).UnmarshalJSON(data))
			}
		case "order_id":
			out.OrderID = string(in.String())
		case "order_status":
			out.OrderStatus = string(in.String())
		case "status":
			out.Status = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca26(out *jwriter.Writer, in AccountActivity) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"id\":"
		out.RawString(prefix[1:])
		out.String(string(in.ID))
	}
	{
		const prefix string = ",\"activity_type\":"
		out.RawString(prefix)
		out.String(string(in.ActivityType))
	}
	{
		const prefix string = ",\"transaction_time\":"
		out.RawString(prefix)
		out.Raw((in.TransactionTime).MarshalJSON())
	}
	{
		const prefix string = ",\"type\":"
		out.RawString(prefix)
		out.String(string(in.Type))
	}
	{
		const prefix string = ",\"price\":"
		out.RawString(prefix)
		out.Raw((in.Price).MarshalJSON())
	}
	{
		const prefix string = ",\"qty\":"
		out.RawString(prefix)
		out.Raw((in.Qty).MarshalJSON())
	}
	{
		const prefix string = ",\"side\":"
		out.RawString(prefix)
		out.String(string(in.Side))
	}
	{
		const prefix string = ",\"symbol\":"
		out.RawString(prefix)
		out.String(string(in.Symbol))
	}
	{
		const prefix string = ",\"leaves_qty\":"
		out.RawString(prefix)
		out.Raw((in.LeavesQty).MarshalJSON())
	}
	{
		const prefix string = ",\"cum_qty\":"
		out.RawString(prefix)
		out.Raw((in.CumQty).MarshalJSON())
	}
	{
		const prefix string = ",\"date\":"
		out.RawString(prefix)
		out.RawText((in.Date).MarshalText())
	}
	{
		const prefix string = ",\"net_amount\":"
		out.RawString(prefix)
		out.Raw((in.NetAmount).MarshalJSON())
	}
	{
		const prefix string = ",\"description\":"
		out.RawString(prefix)
		out.String(string(in.Description))
	}
	{
		const prefix string = ",\"per_share_amount\":"
		out.RawString(prefix)
		out.Raw((in.PerShareAmount).MarshalJSON())
	}
	{
		const prefix string = ",\"order_id\":"
		out.RawString(prefix)
		out.String(string(in.OrderID))
	}
	{
		const prefix string = ",\"order_status\":"
		out.RawString(prefix)
		out.String(string(in.OrderStatus))
	}
	{
		const prefix string = ",\"status\":"
		out.RawString(prefix)
		out.String(string(in.Status))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v AccountActivity) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca26(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v AccountActivity) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca26(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *AccountActivity) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca26(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *AccountActivity) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca26(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca27(in *jlexer.Lexer, out *Account) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "id":
			out.ID = string(in.String())
		case "account_number":
			out.AccountNumber = string(in.String())
		case "status":
			out.Status = string(in.String())
		case "crypto_status":
			out.CryptoStatus = string(in.String())
		case "currency":
			out.Currency = string(in.String())
		case "buying_power":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.BuyingPower).UnmarshalJSON(data))
			}
		case "regt_buying_power":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.RegTBuyingPower).UnmarshalJSON(data))
			}
		case "daytrading_buying_power":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.DaytradingBuyingPower).UnmarshalJSON(data))
			}
		case "effective_buying_power":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.EffectiveBuyingPower).UnmarshalJSON(data))
			}
		case "non_marginable_buying_power":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.NonMarginBuyingPower).UnmarshalJSON(data))
			}
		case "bod_dtbp":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.BodDtbp).UnmarshalJSON(data))
			}
		case "cash":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Cash).UnmarshalJSON(data))
			}
		case "accrued_fees":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.AccruedFees).UnmarshalJSON(data))
			}
		case "portfolio_value":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.PortfolioValue).UnmarshalJSON(data))
			}
		case "pattern_day_trader":
			out.PatternDayTrader = bool(in.Bool())
		case "trading_blocked":
			out.TradingBlocked = bool(in.Bool())
		case "transfers_blocked":
			out.TransfersBlocked = bool(in.Bool())
		case "account_blocked":
			out.AccountBlocked = bool(in.Bool())
		case "shorting_enabled":
			out.ShortingEnabled = bool(in.Bool())
		case "trade_suspended_by_user":
			out.TradeSuspendedByUser = bool(in.Bool())
		case "created_at":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.CreatedAt).UnmarshalJSON(data))
			}
		case "multiplier":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Multiplier).UnmarshalJSON(data))
			}
		case "equity":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.Equity).UnmarshalJSON(data))
			}
		case "last_equity":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.LastEquity).UnmarshalJSON(data))
			}
		case "long_market_value":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.LongMarketValue).UnmarshalJSON(data))
			}
		case "short_market_value":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.ShortMarketValue).UnmarshalJSON(data))
			}
		case "position_market_value":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.PositionMarketValue).UnmarshalJSON(data))
			}
		case "initial_margin":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.InitialMargin).UnmarshalJSON(data))
			}
		case "maintenance_margin":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.MaintenanceMargin).UnmarshalJSON(data))
			}
		case "last_maintenance_margin":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.LastMaintenanceMargin).UnmarshalJSON(data))
			}
		case "sma":
			if data := in.Raw(); in.Ok() {
				in.AddError((out.SMA).UnmarshalJSON(data))
			}
		case "daytrade_count":
			out.DaytradeCount = int64(in.Int64())
		case "crypto_tier":
			out.CryptoTier = int(in.Int())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca27(out *jwriter.Writer, in Account) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"id\":"
		out.RawString(prefix[1:])
		out.String(string(in.ID))
	}
	{
		const prefix string = ",\"account_number\":"
		out.RawString(prefix)
		out.String(string(in.AccountNumber))
	}
	{
		const prefix string = ",\"status\":"
		out.RawString(prefix)
		out.String(string(in.Status))
	}
	{
		const prefix string = ",\"crypto_status\":"
		out.RawString(prefix)
		out.String(string(in.CryptoStatus))
	}
	{
		const prefix string = ",\"currency\":"
		out.RawString(prefix)
		out.String(string(in.Currency))
	}
	{
		const prefix string = ",\"buying_power\":"
		out.RawString(prefix)
		out.Raw((in.BuyingPower).MarshalJSON())
	}
	{
		const prefix string = ",\"regt_buying_power\":"
		out.RawString(prefix)
		out.Raw((in.RegTBuyingPower).MarshalJSON())
	}
	{
		const prefix string = ",\"daytrading_buying_power\":"
		out.RawString(prefix)
		out.Raw((in.DaytradingBuyingPower).MarshalJSON())
	}
	{
		const prefix string = ",\"effective_buying_power\":"
		out.RawString(prefix)
		out.Raw((in.EffectiveBuyingPower).MarshalJSON())
	}
	{
		const prefix string = ",\"non_marginable_buying_power\":"
		out.RawString(prefix)
		out.Raw((in.NonMarginBuyingPower).MarshalJSON())
	}
	{
		const prefix string = ",\"bod_dtbp\":"
		out.RawString(prefix)
		out.Raw((in.BodDtbp).MarshalJSON())
	}
	{
		const prefix string = ",\"cash\":"
		out.RawString(prefix)
		out.Raw((in.Cash).MarshalJSON())
	}
	{
		const prefix string = ",\"accrued_fees\":"
		out.RawString(prefix)
		out.Raw((in.AccruedFees).MarshalJSON())
	}
	{
		const prefix string = ",\"portfolio_value\":"
		out.RawString(prefix)
		out.Raw((in.PortfolioValue).MarshalJSON())
	}
	{
		const prefix string = ",\"pattern_day_trader\":"
		out.RawString(prefix)
		out.Bool(bool(in.PatternDayTrader))
	}
	{
		const prefix string = ",\"trading_blocked\":"
		out.RawString(prefix)
		out.Bool(bool(in.TradingBlocked))
	}
	{
		const prefix string = ",\"transfers_blocked\":"
		out.RawString(prefix)
		out.Bool(bool(in.TransfersBlocked))
	}
	{
		const prefix string = ",\"account_blocked\":"
		out.RawString(prefix)
		out.Bool(bool(in.AccountBlocked))
	}
	{
		const prefix string = ",\"shorting_enabled\":"
		out.RawString(prefix)
		out.Bool(bool(in.ShortingEnabled))
	}
	{
		const prefix string = ",\"trade_suspended_by_user\":"
		out.RawString(prefix)
		out.Bool(bool(in.TradeSuspendedByUser))
	}
	{
		const prefix string = ",\"created_at\":"
		out.RawString(prefix)
		out.Raw((in.CreatedAt).MarshalJSON())
	}
	{
		const prefix string = ",\"multiplier\":"
		out.RawString(prefix)
		out.Raw((in.Multiplier).MarshalJSON())
	}
	{
		const prefix string = ",\"equity\":"
		out.RawString(prefix)
		out.Raw((in.Equity).MarshalJSON())
	}
	{
		const prefix string = ",\"last_equity\":"
		out.RawString(prefix)
		out.Raw((in.LastEquity).MarshalJSON())
	}
	{
		const prefix string = ",\"long_market_value\":"
		out.RawString(prefix)
		out.Raw((in.LongMarketValue).MarshalJSON())
	}
	{
		const prefix string = ",\"short_market_value\":"
		out.RawString(prefix)
		out.Raw((in.ShortMarketValue).MarshalJSON())
	}
	{
		const prefix string = ",\"position_market_value\":"
		out.RawString(prefix)
		out.Raw((in.PositionMarketValue).MarshalJSON())
	}
	{
		const prefix string = ",\"initial_margin\":"
		out.RawString(prefix)
		out.Raw((in.InitialMargin).MarshalJSON())
	}
	{
		const prefix string = ",\"maintenance_margin\":"
		out.RawString(prefix)
		out.Raw((in.MaintenanceMargin).MarshalJSON())
	}
	{
		const prefix string = ",\"last_maintenance_margin\":"
		out.RawString(prefix)
		out.Raw((in.LastMaintenanceMargin).MarshalJSON())
	}
	{
		const prefix string = ",\"sma\":"
		out.RawString(prefix)
		out.Raw((in.SMA).MarshalJSON())
	}
	{
		const prefix string = ",\"daytrade_count\":"
		out.RawString(prefix)
		out.Int64(int64(in.DaytradeCount))
	}
	{
		const prefix string = ",\"crypto_tier\":"
		out.RawString(prefix)
		out.Int(int(in.CryptoTier))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v Account) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca27(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Account) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca27(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *Account) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca27(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Account) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca27(l, v)
}
func easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca28(in *jlexer.Lexer, out *APIError) {
	isTopLevel := in.IsStart()
	if in.IsNull() {
		if isTopLevel {
			in.Consumed()
		}
		in.Skip()
		return
	}
	in.Delim('{')
	for !in.IsDelim('}') {
		key := in.UnsafeFieldName(false)
		in.WantColon()
		if in.IsNull() {
			in.Skip()
			in.WantComma()
			continue
		}
		switch key {
		case "code":
			out.Code = int(in.Int())
		case "message":
			out.Message = string(in.String())
		default:
			in.SkipRecursive()
		}
		in.WantComma()
	}
	in.Delim('}')
	if isTopLevel {
		in.Consumed()
	}
}
func easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca28(out *jwriter.Writer, in APIError) {
	out.RawByte('{')
	first := true
	_ = first
	{
		const prefix string = ",\"code\":"
		if first {
			first = false
			out.RawString(prefix[1:])
		} else {
			out.RawString(prefix)
		}
		out.Int(int(in.Code))
	}
	{
		const prefix string = ",\"message\":"
		out.RawString(prefix)
		out.String(string(in.Message))
	}
	out.RawByte('}')
}

// MarshalJSON supports json.Marshaler interface
func (v APIError) MarshalJSON() ([]byte, error) {
	w := jwriter.Writer{}
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca28(&w, v)
	return w.Buffer.BuildBytes(), w.Error
}

// MarshalEasyJSON supports easyjson.Marshaler interface
func (v APIError) MarshalEasyJSON(w *jwriter.Writer) {
	easyjson3e8ab7adEncodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca28(w, v)
}

// UnmarshalJSON supports json.Unmarshaler interface
func (v *APIError) UnmarshalJSON(data []byte) error {
	r := jlexer.Lexer{Data: data}
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca28(&r, v)
	return r.Error()
}

// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *APIError) UnmarshalEasyJSON(l *jlexer.Lexer) {
	easyjson3e8ab7adDecodeGithubComAlpacahqAlpacaTradeApiGoV3Alpaca28(l, v)
}
