/*
EMS - REST API

This section will provide necessary information about the `CoinAPI EMS REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a>        Implemented Standards:    * [HTTP1.0](https://datatracker.ietf.org/doc/html/rfc1945)   * [HTTP1.1](https://datatracker.ietf.org/doc/html/rfc2616)   * [HTTP2.0](https://datatracker.ietf.org/doc/html/rfc7540)     ### Endpoints  <table>   <thead>     <tr>       <th>Deployment method</th>       <th>Environment</th>       <th>Url</th>     </tr>   </thead>   <tbody>     <tr>       <td>Managed Cloud</td>       <td>Production</td>       <td>Use <a href=\"#ems-docs-sh\">Managed Cloud REST API /v1/locations</a> to get specific endpoints to each server site where your deployments span</td>     </tr>     <tr>       <td>Self Hosted</td>       <td>Production</td>       <td>IP Address of the <code>ems-gateway</code> container/excecutable in the closest server site to the caller location</td>     </tr>   </tbody> </table>  ### Authentication If the software is deployed as `Self-Hosted` then API do not require authentication as inside your infrastructure, your company is responsible for the security and access controls.  If the software is deployed in our `Managed Cloud`, there are 2 methods for authenticating with us, you only need to use one:   1. Custom authorization header named `X-CoinAPI-Key` with the API Key  2. Query string parameter named `apikey` with the API Key  3. <a href=\"#certificate\">TLS Client Certificate</a> from the `Managed Cloud REST API` (/v1/certificate/pem endpoint) while establishing a TLS session with us.  #### Custom authorization header You can authorize by providing additional custom header named `X-CoinAPI-Key` and API key as its value. Assuming that your API key is `73034021-THIS-IS-SAMPLE-KEY`, then the authorization header you should send to us will look like: `X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY` <aside class=\"success\">This method is recommended by us and you should use it in production environments.</aside> #### Query string authorization parameter You can authorize by providing an additional parameter named `apikey` with a value equal to your API key in the query string of your HTTP request. Assuming that your API key is `73034021-THIS-IS-SAMPLE-KEY` and that you want to request all balances, then your query string should look like this: `GET /v1/balances?apikey=73034021-THIS-IS-SAMPLE-KEY` <aside class=\"notice\">Query string method may be more practical for development activities.</aside> 

API version: v1
Contact: support@coinapi.io
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package openapi

import (
	"encoding/json"
)

// checks if the OrderHistory type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &OrderHistory{}

// OrderHistory struct for OrderHistory
type OrderHistory struct {
	// Apikey
	Apikey *string `json:"apikey,omitempty"`
	// Exchange id
	ExchangeId *string `json:"exchangeId,omitempty"`
	// Client order id
	ClientOrderId *string `json:"clientOrderId,omitempty"`
	// Symbol id exchange
	SymbolIdExchange *string `json:"symbolIdExchange,omitempty"`
	// Symbol id in coinapi
	SymbolIdCoinapi *string `json:"symbolIdCoinapi,omitempty"`
	// Amount
	AmountOrder *float32 `json:"amountOrder,omitempty"`
	// Price
	Price *float32 `json:"price,omitempty"`
	// 1-buy, 2-sell
	Side *float32 `json:"side,omitempty"`
	// Order type
	OrderType *string `json:"orderType,omitempty"`
	// Time in force
	TimeInForce *string `json:"timeInForce,omitempty"`
	// Expire time
	ExpireTime *string `json:"expireTime,omitempty"`
	// Exec inst
	ExecInst []string `json:"execInst,omitempty"`
	// Client order id format
	ClientOrderIdFormatExchange *string `json:"clientOrderIdFormatExchange,omitempty"`
	// Exchange order id
	ExchangeOrderId *string `json:"exchangeOrderId,omitempty"`
	// Amount open
	AmountOpen *float32 `json:"amountOpen,omitempty"`
	// Amount filled
	AmountFilled *float32 `json:"amountFilled,omitempty"`
	// Average price
	AvgPx *float32 `json:"avgPx,omitempty"`
	// Status
	Status *string `json:"status,omitempty"`
	// History status
	StatusHistoryStatus []string `json:"statusHistoryStatus,omitempty"`
	// History status time
	StatusHistoryTime []string `json:"statusHistoryTime,omitempty"`
	// Error message
	ErrorMessageResult *string `json:"errorMessageResult,omitempty"`
	// Error message reason
	ErrorMessageReason *string `json:"errorMessageReason,omitempty"`
	// Error message
	ErrorMessageMessage *string `json:"errorMessageMessage,omitempty"`
	// Fills time
	FillsTime []string `json:"fillsTime,omitempty"`
	// Fills price
	FillsPrice []float32 `json:"fillsPrice,omitempty"`
	// Fills amount
	FillsAmount []float32 `json:"fillsAmount,omitempty"`
	// Created time
	CreatedTime *string `json:"createdTime,omitempty"`
}

// NewOrderHistory instantiates a new OrderHistory object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewOrderHistory() *OrderHistory {
	this := OrderHistory{}
	return &this
}

// NewOrderHistoryWithDefaults instantiates a new OrderHistory object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewOrderHistoryWithDefaults() *OrderHistory {
	this := OrderHistory{}
	return &this
}

// GetApikey returns the Apikey field value if set, zero value otherwise.
func (o *OrderHistory) GetApikey() string {
	if o == nil || IsNil(o.Apikey) {
		var ret string
		return ret
	}
	return *o.Apikey
}

// GetApikeyOk returns a tuple with the Apikey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetApikeyOk() (*string, bool) {
	if o == nil || IsNil(o.Apikey) {
		return nil, false
	}
	return o.Apikey, true
}

// HasApikey returns a boolean if a field has been set.
func (o *OrderHistory) HasApikey() bool {
	if o != nil && !IsNil(o.Apikey) {
		return true
	}

	return false
}

// SetApikey gets a reference to the given string and assigns it to the Apikey field.
func (o *OrderHistory) SetApikey(v string) {
	o.Apikey = &v
}

// GetExchangeId returns the ExchangeId field value if set, zero value otherwise.
func (o *OrderHistory) GetExchangeId() string {
	if o == nil || IsNil(o.ExchangeId) {
		var ret string
		return ret
	}
	return *o.ExchangeId
}

// GetExchangeIdOk returns a tuple with the ExchangeId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetExchangeIdOk() (*string, bool) {
	if o == nil || IsNil(o.ExchangeId) {
		return nil, false
	}
	return o.ExchangeId, true
}

// HasExchangeId returns a boolean if a field has been set.
func (o *OrderHistory) HasExchangeId() bool {
	if o != nil && !IsNil(o.ExchangeId) {
		return true
	}

	return false
}

// SetExchangeId gets a reference to the given string and assigns it to the ExchangeId field.
func (o *OrderHistory) SetExchangeId(v string) {
	o.ExchangeId = &v
}

// GetClientOrderId returns the ClientOrderId field value if set, zero value otherwise.
func (o *OrderHistory) GetClientOrderId() string {
	if o == nil || IsNil(o.ClientOrderId) {
		var ret string
		return ret
	}
	return *o.ClientOrderId
}

// GetClientOrderIdOk returns a tuple with the ClientOrderId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetClientOrderIdOk() (*string, bool) {
	if o == nil || IsNil(o.ClientOrderId) {
		return nil, false
	}
	return o.ClientOrderId, true
}

// HasClientOrderId returns a boolean if a field has been set.
func (o *OrderHistory) HasClientOrderId() bool {
	if o != nil && !IsNil(o.ClientOrderId) {
		return true
	}

	return false
}

// SetClientOrderId gets a reference to the given string and assigns it to the ClientOrderId field.
func (o *OrderHistory) SetClientOrderId(v string) {
	o.ClientOrderId = &v
}

// GetSymbolIdExchange returns the SymbolIdExchange field value if set, zero value otherwise.
func (o *OrderHistory) GetSymbolIdExchange() string {
	if o == nil || IsNil(o.SymbolIdExchange) {
		var ret string
		return ret
	}
	return *o.SymbolIdExchange
}

// GetSymbolIdExchangeOk returns a tuple with the SymbolIdExchange field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetSymbolIdExchangeOk() (*string, bool) {
	if o == nil || IsNil(o.SymbolIdExchange) {
		return nil, false
	}
	return o.SymbolIdExchange, true
}

// HasSymbolIdExchange returns a boolean if a field has been set.
func (o *OrderHistory) HasSymbolIdExchange() bool {
	if o != nil && !IsNil(o.SymbolIdExchange) {
		return true
	}

	return false
}

// SetSymbolIdExchange gets a reference to the given string and assigns it to the SymbolIdExchange field.
func (o *OrderHistory) SetSymbolIdExchange(v string) {
	o.SymbolIdExchange = &v
}

// GetSymbolIdCoinapi returns the SymbolIdCoinapi field value if set, zero value otherwise.
func (o *OrderHistory) GetSymbolIdCoinapi() string {
	if o == nil || IsNil(o.SymbolIdCoinapi) {
		var ret string
		return ret
	}
	return *o.SymbolIdCoinapi
}

// GetSymbolIdCoinapiOk returns a tuple with the SymbolIdCoinapi field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetSymbolIdCoinapiOk() (*string, bool) {
	if o == nil || IsNil(o.SymbolIdCoinapi) {
		return nil, false
	}
	return o.SymbolIdCoinapi, true
}

// HasSymbolIdCoinapi returns a boolean if a field has been set.
func (o *OrderHistory) HasSymbolIdCoinapi() bool {
	if o != nil && !IsNil(o.SymbolIdCoinapi) {
		return true
	}

	return false
}

// SetSymbolIdCoinapi gets a reference to the given string and assigns it to the SymbolIdCoinapi field.
func (o *OrderHistory) SetSymbolIdCoinapi(v string) {
	o.SymbolIdCoinapi = &v
}

// GetAmountOrder returns the AmountOrder field value if set, zero value otherwise.
func (o *OrderHistory) GetAmountOrder() float32 {
	if o == nil || IsNil(o.AmountOrder) {
		var ret float32
		return ret
	}
	return *o.AmountOrder
}

// GetAmountOrderOk returns a tuple with the AmountOrder field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetAmountOrderOk() (*float32, bool) {
	if o == nil || IsNil(o.AmountOrder) {
		return nil, false
	}
	return o.AmountOrder, true
}

// HasAmountOrder returns a boolean if a field has been set.
func (o *OrderHistory) HasAmountOrder() bool {
	if o != nil && !IsNil(o.AmountOrder) {
		return true
	}

	return false
}

// SetAmountOrder gets a reference to the given float32 and assigns it to the AmountOrder field.
func (o *OrderHistory) SetAmountOrder(v float32) {
	o.AmountOrder = &v
}

// GetPrice returns the Price field value if set, zero value otherwise.
func (o *OrderHistory) GetPrice() float32 {
	if o == nil || IsNil(o.Price) {
		var ret float32
		return ret
	}
	return *o.Price
}

// GetPriceOk returns a tuple with the Price field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetPriceOk() (*float32, bool) {
	if o == nil || IsNil(o.Price) {
		return nil, false
	}
	return o.Price, true
}

// HasPrice returns a boolean if a field has been set.
func (o *OrderHistory) HasPrice() bool {
	if o != nil && !IsNil(o.Price) {
		return true
	}

	return false
}

// SetPrice gets a reference to the given float32 and assigns it to the Price field.
func (o *OrderHistory) SetPrice(v float32) {
	o.Price = &v
}

// GetSide returns the Side field value if set, zero value otherwise.
func (o *OrderHistory) GetSide() float32 {
	if o == nil || IsNil(o.Side) {
		var ret float32
		return ret
	}
	return *o.Side
}

// GetSideOk returns a tuple with the Side field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetSideOk() (*float32, bool) {
	if o == nil || IsNil(o.Side) {
		return nil, false
	}
	return o.Side, true
}

// HasSide returns a boolean if a field has been set.
func (o *OrderHistory) HasSide() bool {
	if o != nil && !IsNil(o.Side) {
		return true
	}

	return false
}

// SetSide gets a reference to the given float32 and assigns it to the Side field.
func (o *OrderHistory) SetSide(v float32) {
	o.Side = &v
}

// GetOrderType returns the OrderType field value if set, zero value otherwise.
func (o *OrderHistory) GetOrderType() string {
	if o == nil || IsNil(o.OrderType) {
		var ret string
		return ret
	}
	return *o.OrderType
}

// GetOrderTypeOk returns a tuple with the OrderType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetOrderTypeOk() (*string, bool) {
	if o == nil || IsNil(o.OrderType) {
		return nil, false
	}
	return o.OrderType, true
}

// HasOrderType returns a boolean if a field has been set.
func (o *OrderHistory) HasOrderType() bool {
	if o != nil && !IsNil(o.OrderType) {
		return true
	}

	return false
}

// SetOrderType gets a reference to the given string and assigns it to the OrderType field.
func (o *OrderHistory) SetOrderType(v string) {
	o.OrderType = &v
}

// GetTimeInForce returns the TimeInForce field value if set, zero value otherwise.
func (o *OrderHistory) GetTimeInForce() string {
	if o == nil || IsNil(o.TimeInForce) {
		var ret string
		return ret
	}
	return *o.TimeInForce
}

// GetTimeInForceOk returns a tuple with the TimeInForce field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetTimeInForceOk() (*string, bool) {
	if o == nil || IsNil(o.TimeInForce) {
		return nil, false
	}
	return o.TimeInForce, true
}

// HasTimeInForce returns a boolean if a field has been set.
func (o *OrderHistory) HasTimeInForce() bool {
	if o != nil && !IsNil(o.TimeInForce) {
		return true
	}

	return false
}

// SetTimeInForce gets a reference to the given string and assigns it to the TimeInForce field.
func (o *OrderHistory) SetTimeInForce(v string) {
	o.TimeInForce = &v
}

// GetExpireTime returns the ExpireTime field value if set, zero value otherwise.
func (o *OrderHistory) GetExpireTime() string {
	if o == nil || IsNil(o.ExpireTime) {
		var ret string
		return ret
	}
	return *o.ExpireTime
}

// GetExpireTimeOk returns a tuple with the ExpireTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetExpireTimeOk() (*string, bool) {
	if o == nil || IsNil(o.ExpireTime) {
		return nil, false
	}
	return o.ExpireTime, true
}

// HasExpireTime returns a boolean if a field has been set.
func (o *OrderHistory) HasExpireTime() bool {
	if o != nil && !IsNil(o.ExpireTime) {
		return true
	}

	return false
}

// SetExpireTime gets a reference to the given string and assigns it to the ExpireTime field.
func (o *OrderHistory) SetExpireTime(v string) {
	o.ExpireTime = &v
}

// GetExecInst returns the ExecInst field value if set, zero value otherwise.
func (o *OrderHistory) GetExecInst() []string {
	if o == nil || IsNil(o.ExecInst) {
		var ret []string
		return ret
	}
	return o.ExecInst
}

// GetExecInstOk returns a tuple with the ExecInst field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetExecInstOk() ([]string, bool) {
	if o == nil || IsNil(o.ExecInst) {
		return nil, false
	}
	return o.ExecInst, true
}

// HasExecInst returns a boolean if a field has been set.
func (o *OrderHistory) HasExecInst() bool {
	if o != nil && !IsNil(o.ExecInst) {
		return true
	}

	return false
}

// SetExecInst gets a reference to the given []string and assigns it to the ExecInst field.
func (o *OrderHistory) SetExecInst(v []string) {
	o.ExecInst = v
}

// GetClientOrderIdFormatExchange returns the ClientOrderIdFormatExchange field value if set, zero value otherwise.
func (o *OrderHistory) GetClientOrderIdFormatExchange() string {
	if o == nil || IsNil(o.ClientOrderIdFormatExchange) {
		var ret string
		return ret
	}
	return *o.ClientOrderIdFormatExchange
}

// GetClientOrderIdFormatExchangeOk returns a tuple with the ClientOrderIdFormatExchange field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetClientOrderIdFormatExchangeOk() (*string, bool) {
	if o == nil || IsNil(o.ClientOrderIdFormatExchange) {
		return nil, false
	}
	return o.ClientOrderIdFormatExchange, true
}

// HasClientOrderIdFormatExchange returns a boolean if a field has been set.
func (o *OrderHistory) HasClientOrderIdFormatExchange() bool {
	if o != nil && !IsNil(o.ClientOrderIdFormatExchange) {
		return true
	}

	return false
}

// SetClientOrderIdFormatExchange gets a reference to the given string and assigns it to the ClientOrderIdFormatExchange field.
func (o *OrderHistory) SetClientOrderIdFormatExchange(v string) {
	o.ClientOrderIdFormatExchange = &v
}

// GetExchangeOrderId returns the ExchangeOrderId field value if set, zero value otherwise.
func (o *OrderHistory) GetExchangeOrderId() string {
	if o == nil || IsNil(o.ExchangeOrderId) {
		var ret string
		return ret
	}
	return *o.ExchangeOrderId
}

// GetExchangeOrderIdOk returns a tuple with the ExchangeOrderId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetExchangeOrderIdOk() (*string, bool) {
	if o == nil || IsNil(o.ExchangeOrderId) {
		return nil, false
	}
	return o.ExchangeOrderId, true
}

// HasExchangeOrderId returns a boolean if a field has been set.
func (o *OrderHistory) HasExchangeOrderId() bool {
	if o != nil && !IsNil(o.ExchangeOrderId) {
		return true
	}

	return false
}

// SetExchangeOrderId gets a reference to the given string and assigns it to the ExchangeOrderId field.
func (o *OrderHistory) SetExchangeOrderId(v string) {
	o.ExchangeOrderId = &v
}

// GetAmountOpen returns the AmountOpen field value if set, zero value otherwise.
func (o *OrderHistory) GetAmountOpen() float32 {
	if o == nil || IsNil(o.AmountOpen) {
		var ret float32
		return ret
	}
	return *o.AmountOpen
}

// GetAmountOpenOk returns a tuple with the AmountOpen field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetAmountOpenOk() (*float32, bool) {
	if o == nil || IsNil(o.AmountOpen) {
		return nil, false
	}
	return o.AmountOpen, true
}

// HasAmountOpen returns a boolean if a field has been set.
func (o *OrderHistory) HasAmountOpen() bool {
	if o != nil && !IsNil(o.AmountOpen) {
		return true
	}

	return false
}

// SetAmountOpen gets a reference to the given float32 and assigns it to the AmountOpen field.
func (o *OrderHistory) SetAmountOpen(v float32) {
	o.AmountOpen = &v
}

// GetAmountFilled returns the AmountFilled field value if set, zero value otherwise.
func (o *OrderHistory) GetAmountFilled() float32 {
	if o == nil || IsNil(o.AmountFilled) {
		var ret float32
		return ret
	}
	return *o.AmountFilled
}

// GetAmountFilledOk returns a tuple with the AmountFilled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetAmountFilledOk() (*float32, bool) {
	if o == nil || IsNil(o.AmountFilled) {
		return nil, false
	}
	return o.AmountFilled, true
}

// HasAmountFilled returns a boolean if a field has been set.
func (o *OrderHistory) HasAmountFilled() bool {
	if o != nil && !IsNil(o.AmountFilled) {
		return true
	}

	return false
}

// SetAmountFilled gets a reference to the given float32 and assigns it to the AmountFilled field.
func (o *OrderHistory) SetAmountFilled(v float32) {
	o.AmountFilled = &v
}

// GetAvgPx returns the AvgPx field value if set, zero value otherwise.
func (o *OrderHistory) GetAvgPx() float32 {
	if o == nil || IsNil(o.AvgPx) {
		var ret float32
		return ret
	}
	return *o.AvgPx
}

// GetAvgPxOk returns a tuple with the AvgPx field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetAvgPxOk() (*float32, bool) {
	if o == nil || IsNil(o.AvgPx) {
		return nil, false
	}
	return o.AvgPx, true
}

// HasAvgPx returns a boolean if a field has been set.
func (o *OrderHistory) HasAvgPx() bool {
	if o != nil && !IsNil(o.AvgPx) {
		return true
	}

	return false
}

// SetAvgPx gets a reference to the given float32 and assigns it to the AvgPx field.
func (o *OrderHistory) SetAvgPx(v float32) {
	o.AvgPx = &v
}

// GetStatus returns the Status field value if set, zero value otherwise.
func (o *OrderHistory) GetStatus() string {
	if o == nil || IsNil(o.Status) {
		var ret string
		return ret
	}
	return *o.Status
}

// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetStatusOk() (*string, bool) {
	if o == nil || IsNil(o.Status) {
		return nil, false
	}
	return o.Status, true
}

// HasStatus returns a boolean if a field has been set.
func (o *OrderHistory) HasStatus() bool {
	if o != nil && !IsNil(o.Status) {
		return true
	}

	return false
}

// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *OrderHistory) SetStatus(v string) {
	o.Status = &v
}

// GetStatusHistoryStatus returns the StatusHistoryStatus field value if set, zero value otherwise.
func (o *OrderHistory) GetStatusHistoryStatus() []string {
	if o == nil || IsNil(o.StatusHistoryStatus) {
		var ret []string
		return ret
	}
	return o.StatusHistoryStatus
}

// GetStatusHistoryStatusOk returns a tuple with the StatusHistoryStatus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetStatusHistoryStatusOk() ([]string, bool) {
	if o == nil || IsNil(o.StatusHistoryStatus) {
		return nil, false
	}
	return o.StatusHistoryStatus, true
}

// HasStatusHistoryStatus returns a boolean if a field has been set.
func (o *OrderHistory) HasStatusHistoryStatus() bool {
	if o != nil && !IsNil(o.StatusHistoryStatus) {
		return true
	}

	return false
}

// SetStatusHistoryStatus gets a reference to the given []string and assigns it to the StatusHistoryStatus field.
func (o *OrderHistory) SetStatusHistoryStatus(v []string) {
	o.StatusHistoryStatus = v
}

// GetStatusHistoryTime returns the StatusHistoryTime field value if set, zero value otherwise.
func (o *OrderHistory) GetStatusHistoryTime() []string {
	if o == nil || IsNil(o.StatusHistoryTime) {
		var ret []string
		return ret
	}
	return o.StatusHistoryTime
}

// GetStatusHistoryTimeOk returns a tuple with the StatusHistoryTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetStatusHistoryTimeOk() ([]string, bool) {
	if o == nil || IsNil(o.StatusHistoryTime) {
		return nil, false
	}
	return o.StatusHistoryTime, true
}

// HasStatusHistoryTime returns a boolean if a field has been set.
func (o *OrderHistory) HasStatusHistoryTime() bool {
	if o != nil && !IsNil(o.StatusHistoryTime) {
		return true
	}

	return false
}

// SetStatusHistoryTime gets a reference to the given []string and assigns it to the StatusHistoryTime field.
func (o *OrderHistory) SetStatusHistoryTime(v []string) {
	o.StatusHistoryTime = v
}

// GetErrorMessageResult returns the ErrorMessageResult field value if set, zero value otherwise.
func (o *OrderHistory) GetErrorMessageResult() string {
	if o == nil || IsNil(o.ErrorMessageResult) {
		var ret string
		return ret
	}
	return *o.ErrorMessageResult
}

// GetErrorMessageResultOk returns a tuple with the ErrorMessageResult field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetErrorMessageResultOk() (*string, bool) {
	if o == nil || IsNil(o.ErrorMessageResult) {
		return nil, false
	}
	return o.ErrorMessageResult, true
}

// HasErrorMessageResult returns a boolean if a field has been set.
func (o *OrderHistory) HasErrorMessageResult() bool {
	if o != nil && !IsNil(o.ErrorMessageResult) {
		return true
	}

	return false
}

// SetErrorMessageResult gets a reference to the given string and assigns it to the ErrorMessageResult field.
func (o *OrderHistory) SetErrorMessageResult(v string) {
	o.ErrorMessageResult = &v
}

// GetErrorMessageReason returns the ErrorMessageReason field value if set, zero value otherwise.
func (o *OrderHistory) GetErrorMessageReason() string {
	if o == nil || IsNil(o.ErrorMessageReason) {
		var ret string
		return ret
	}
	return *o.ErrorMessageReason
}

// GetErrorMessageReasonOk returns a tuple with the ErrorMessageReason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetErrorMessageReasonOk() (*string, bool) {
	if o == nil || IsNil(o.ErrorMessageReason) {
		return nil, false
	}
	return o.ErrorMessageReason, true
}

// HasErrorMessageReason returns a boolean if a field has been set.
func (o *OrderHistory) HasErrorMessageReason() bool {
	if o != nil && !IsNil(o.ErrorMessageReason) {
		return true
	}

	return false
}

// SetErrorMessageReason gets a reference to the given string and assigns it to the ErrorMessageReason field.
func (o *OrderHistory) SetErrorMessageReason(v string) {
	o.ErrorMessageReason = &v
}

// GetErrorMessageMessage returns the ErrorMessageMessage field value if set, zero value otherwise.
func (o *OrderHistory) GetErrorMessageMessage() string {
	if o == nil || IsNil(o.ErrorMessageMessage) {
		var ret string
		return ret
	}
	return *o.ErrorMessageMessage
}

// GetErrorMessageMessageOk returns a tuple with the ErrorMessageMessage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetErrorMessageMessageOk() (*string, bool) {
	if o == nil || IsNil(o.ErrorMessageMessage) {
		return nil, false
	}
	return o.ErrorMessageMessage, true
}

// HasErrorMessageMessage returns a boolean if a field has been set.
func (o *OrderHistory) HasErrorMessageMessage() bool {
	if o != nil && !IsNil(o.ErrorMessageMessage) {
		return true
	}

	return false
}

// SetErrorMessageMessage gets a reference to the given string and assigns it to the ErrorMessageMessage field.
func (o *OrderHistory) SetErrorMessageMessage(v string) {
	o.ErrorMessageMessage = &v
}

// GetFillsTime returns the FillsTime field value if set, zero value otherwise.
func (o *OrderHistory) GetFillsTime() []string {
	if o == nil || IsNil(o.FillsTime) {
		var ret []string
		return ret
	}
	return o.FillsTime
}

// GetFillsTimeOk returns a tuple with the FillsTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetFillsTimeOk() ([]string, bool) {
	if o == nil || IsNil(o.FillsTime) {
		return nil, false
	}
	return o.FillsTime, true
}

// HasFillsTime returns a boolean if a field has been set.
func (o *OrderHistory) HasFillsTime() bool {
	if o != nil && !IsNil(o.FillsTime) {
		return true
	}

	return false
}

// SetFillsTime gets a reference to the given []string and assigns it to the FillsTime field.
func (o *OrderHistory) SetFillsTime(v []string) {
	o.FillsTime = v
}

// GetFillsPrice returns the FillsPrice field value if set, zero value otherwise.
func (o *OrderHistory) GetFillsPrice() []float32 {
	if o == nil || IsNil(o.FillsPrice) {
		var ret []float32
		return ret
	}
	return o.FillsPrice
}

// GetFillsPriceOk returns a tuple with the FillsPrice field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetFillsPriceOk() ([]float32, bool) {
	if o == nil || IsNil(o.FillsPrice) {
		return nil, false
	}
	return o.FillsPrice, true
}

// HasFillsPrice returns a boolean if a field has been set.
func (o *OrderHistory) HasFillsPrice() bool {
	if o != nil && !IsNil(o.FillsPrice) {
		return true
	}

	return false
}

// SetFillsPrice gets a reference to the given []float32 and assigns it to the FillsPrice field.
func (o *OrderHistory) SetFillsPrice(v []float32) {
	o.FillsPrice = v
}

// GetFillsAmount returns the FillsAmount field value if set, zero value otherwise.
func (o *OrderHistory) GetFillsAmount() []float32 {
	if o == nil || IsNil(o.FillsAmount) {
		var ret []float32
		return ret
	}
	return o.FillsAmount
}

// GetFillsAmountOk returns a tuple with the FillsAmount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetFillsAmountOk() ([]float32, bool) {
	if o == nil || IsNil(o.FillsAmount) {
		return nil, false
	}
	return o.FillsAmount, true
}

// HasFillsAmount returns a boolean if a field has been set.
func (o *OrderHistory) HasFillsAmount() bool {
	if o != nil && !IsNil(o.FillsAmount) {
		return true
	}

	return false
}

// SetFillsAmount gets a reference to the given []float32 and assigns it to the FillsAmount field.
func (o *OrderHistory) SetFillsAmount(v []float32) {
	o.FillsAmount = v
}

// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
func (o *OrderHistory) GetCreatedTime() string {
	if o == nil || IsNil(o.CreatedTime) {
		var ret string
		return ret
	}
	return *o.CreatedTime
}

// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OrderHistory) GetCreatedTimeOk() (*string, bool) {
	if o == nil || IsNil(o.CreatedTime) {
		return nil, false
	}
	return o.CreatedTime, true
}

// HasCreatedTime returns a boolean if a field has been set.
func (o *OrderHistory) HasCreatedTime() bool {
	if o != nil && !IsNil(o.CreatedTime) {
		return true
	}

	return false
}

// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
func (o *OrderHistory) SetCreatedTime(v string) {
	o.CreatedTime = &v
}

func (o OrderHistory) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o OrderHistory) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Apikey) {
		toSerialize["apikey"] = o.Apikey
	}
	if !IsNil(o.ExchangeId) {
		toSerialize["exchangeId"] = o.ExchangeId
	}
	if !IsNil(o.ClientOrderId) {
		toSerialize["clientOrderId"] = o.ClientOrderId
	}
	if !IsNil(o.SymbolIdExchange) {
		toSerialize["symbolIdExchange"] = o.SymbolIdExchange
	}
	if !IsNil(o.SymbolIdCoinapi) {
		toSerialize["symbolIdCoinapi"] = o.SymbolIdCoinapi
	}
	if !IsNil(o.AmountOrder) {
		toSerialize["amountOrder"] = o.AmountOrder
	}
	if !IsNil(o.Price) {
		toSerialize["price"] = o.Price
	}
	if !IsNil(o.Side) {
		toSerialize["side"] = o.Side
	}
	if !IsNil(o.OrderType) {
		toSerialize["orderType"] = o.OrderType
	}
	if !IsNil(o.TimeInForce) {
		toSerialize["timeInForce"] = o.TimeInForce
	}
	if !IsNil(o.ExpireTime) {
		toSerialize["expireTime"] = o.ExpireTime
	}
	if !IsNil(o.ExecInst) {
		toSerialize["execInst"] = o.ExecInst
	}
	if !IsNil(o.ClientOrderIdFormatExchange) {
		toSerialize["clientOrderIdFormatExchange"] = o.ClientOrderIdFormatExchange
	}
	if !IsNil(o.ExchangeOrderId) {
		toSerialize["exchangeOrderId"] = o.ExchangeOrderId
	}
	if !IsNil(o.AmountOpen) {
		toSerialize["amountOpen"] = o.AmountOpen
	}
	if !IsNil(o.AmountFilled) {
		toSerialize["amountFilled"] = o.AmountFilled
	}
	if !IsNil(o.AvgPx) {
		toSerialize["avgPx"] = o.AvgPx
	}
	if !IsNil(o.Status) {
		toSerialize["status"] = o.Status
	}
	if !IsNil(o.StatusHistoryStatus) {
		toSerialize["statusHistoryStatus"] = o.StatusHistoryStatus
	}
	if !IsNil(o.StatusHistoryTime) {
		toSerialize["statusHistoryTime"] = o.StatusHistoryTime
	}
	if !IsNil(o.ErrorMessageResult) {
		toSerialize["errorMessageResult"] = o.ErrorMessageResult
	}
	if !IsNil(o.ErrorMessageReason) {
		toSerialize["errorMessageReason"] = o.ErrorMessageReason
	}
	if !IsNil(o.ErrorMessageMessage) {
		toSerialize["errorMessageMessage"] = o.ErrorMessageMessage
	}
	if !IsNil(o.FillsTime) {
		toSerialize["fillsTime"] = o.FillsTime
	}
	if !IsNil(o.FillsPrice) {
		toSerialize["fillsPrice"] = o.FillsPrice
	}
	if !IsNil(o.FillsAmount) {
		toSerialize["fillsAmount"] = o.FillsAmount
	}
	if !IsNil(o.CreatedTime) {
		toSerialize["createdTime"] = o.CreatedTime
	}
	return toSerialize, nil
}

type NullableOrderHistory struct {
	value *OrderHistory
	isSet bool
}

func (v NullableOrderHistory) Get() *OrderHistory {
	return v.value
}

func (v *NullableOrderHistory) Set(val *OrderHistory) {
	v.value = val
	v.isSet = true
}

func (v NullableOrderHistory) IsSet() bool {
	return v.isSet
}

func (v *NullableOrderHistory) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableOrderHistory(val *OrderHistory) *NullableOrderHistory {
	return &NullableOrderHistory{value: val, isSet: true}
}

func (v NullableOrderHistory) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableOrderHistory) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}


