Skip to content

OrderHistory - Fatal error in JsonConvert. Failed to map the JSON object to the JavaScript class "OrderData" because of a type error. #15

@AndrewBarba

Description

@AndrewBarba

Seeing this error when listing certain markets:

  pathname: '/account/getorderhistory',
  data: { market: 'BTC-NEO' },
  error: Error: Fatal error in JsonConvert. Failed to map the JSON object to the JavaScript class "OrderData" because of a type error.

	Class property:
		OrderType

	Expected type:
		undefined

	JSON property:
		OrderType

	JSON type:
		string

	JSON value:
		"LIMIT_BUY"

	Reason: Expected type is unknown. There might be multiple reasons for this:
	- You are missing the decorator @JsonObject (for object mapping)
	- You are missing the decorator @JsonConverter (for custom mapping) before your class definition
	- Your given class is undefined in the decorator because of circular dependencies


    at JsonConvert.deserializeObject_loopProperty (/api/node_modules/json2typescript/src/json2typescript/json-convert.js:220:19)
    at JsonConvert.deserializeObject (/api/node_modules/json2typescript/src/json2typescript/json-convert.js:132:18)
    at JsonConvert.deserializeArray /api/node_modules/json2typescript/src/json2typescript/json-convert.js:157:29)
    at JsonConvert.deserialize (/api/node_modules/json2typescript/src/json2typescript/json-convert.js:109:25)
    at Promise (/api/node_modules/bittrex-typescript/src/Transport.js:43:53)
    at new Promise (<anonymous>)
    at Transport.handleResponse (/api/node_modules/bittrex-typescript/src/Transport.js:39:16)
    at got.then (/api/node_modules/bittrex-typescript/src/Transport.js:29:25)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7) }

Any ideas? The response looks totally normal, every OrderType is either LIMIT_BUY or LIMIT_SELL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions