--[[
  Upbit Open API
 
  ## REST API for Upbit Exchange - Base URL: [https://api.upbit.com] - Official Upbit API Documents: [https://docs.upbit.com] - Official Support email: [open-api@upbit.com] 
 
  OpenAPI spec version: 1.0.0
  Contact: ujhin942@gmail.com
  Generated by: https://github.com/swagger-api/swagger-codegen.git
]]

-- ticker class
local ticker = {}
local ticker_mt = {
	__name = "ticker";
	__index = ticker;
}

local function cast_ticker(t)
	return setmetatable(t, ticker_mt)
end

local function new_ticker(market, trade_date, trade_time, trade_date_kst, trade_time_kst, opening_price, high_price, low_price, trade_price, prev_closing_price, change, change_price, change_rate, signed_change_price, signed_change_rate, trade_volume, acc_trade_price, acc_trade_price_24h, acc_trade_volume, acc_trade_volume_24h, highest_52_week_price, highest_52_week_date, lowest_52_week_price, lowest_52_week_date, timestamp)
	return cast_ticker({
		["market"] = market;
		["trade_date"] = trade_date;
		["trade_time"] = trade_time;
		["trade_date_kst"] = trade_date_kst;
		["trade_time_kst"] = trade_time_kst;
		["opening_price"] = opening_price;
		["high_price"] = high_price;
		["low_price"] = low_price;
		["trade_price"] = trade_price;
		["prev_closing_price"] = prev_closing_price;
		["change"] = change;
		["change_price"] = change_price;
		["change_rate"] = change_rate;
		["signed_change_price"] = signed_change_price;
		["signed_change_rate"] = signed_change_rate;
		["trade_volume"] = trade_volume;
		["acc_trade_price"] = acc_trade_price;
		["acc_trade_price_24h"] = acc_trade_price_24h;
		["acc_trade_volume"] = acc_trade_volume;
		["acc_trade_volume_24h"] = acc_trade_volume_24h;
		["highest_52_week_price"] = highest_52_week_price;
		["highest_52_week_date"] = highest_52_week_date;
		["lowest_52_week_price"] = lowest_52_week_price;
		["lowest_52_week_date"] = lowest_52_week_date;
		["timestamp"] = timestamp;
	})
end

return {
	cast = cast_ticker;
	new = new_ticker;
}
